Skip to content

Commit

Permalink
fix: return empty string if capture_output=False
Browse files Browse the repository at this point in the history
  • Loading branch information
kelly-sovacool committed Sep 10, 2024
1 parent 996252f commit d8af76e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ccbr_tools/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ def shell_run(command_str, capture_output=True, check=True, shell=True, text=Tru
command_str, capture_output=capture_output, shell=shell, text=text, check=check
)
if capture_output:
return concat_newline(out.stdout, out.stderr)
return_val = concat_newline(out.stdout, out.stderr)
else:
return_val = ""
return return_val


def exec_in_context(func: callable, *args: str, **kwargs: str):
Expand Down

0 comments on commit d8af76e

Please sign in to comment.