File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ def execute(self):
3333 env = env ,
3434 )
3535
36- # Write stdout/stderr to staging_paths (keys match output_formats)
37- with fsspec .open (self .staging_paths ["stdout" ], "w" , encoding = "utf-8" ) as f :
38- f .write (result .stdout )
39- with fsspec .open (self .staging_paths ["stderr" ], "w" , encoding = "utf-8" ) as f :
40- f .write (result .stderr )
36+ # Only write stdout/stderr if there's content
37+ if result .stdout :
38+ with fsspec .open (self .staging_paths ["stdout" ], "w" , encoding = "utf-8" ) as f :
39+ f .write (result .stdout )
40+ if result .stderr :
41+ with fsspec .open (self .staging_paths ["stderr" ], "w" , encoding = "utf-8" ) as f :
42+ f .write (result .stderr )
4143
4244 # Capture any additional side effect files AFTER writing stdout/stderr
4345 self .add_side_effects_files (staging_dir )
You can’t perform that action at this time.
0 commit comments