Skip to content

Commit

Permalink
Further address comment on #1530
Browse files Browse the repository at this point in the history
  • Loading branch information
gaow committed Feb 4, 2024
1 parent 9d74bcc commit ffeac9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sos/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ def run(self, **kwargs):

p = subprocess.Popen(cmd, shell=True, stderr=se, stdout=so)
ret = p.wait()
if ret != 0:
# write an error message to stderr
se.write(f'\nError occured when executing the following code chunk, saved to script:\n{debug_script_file}\n\n')

if so is not None and so != subprocess.DEVNULL:
so.close()
Expand Down

0 comments on commit ffeac9c

Please sign in to comment.