@@ -180,7 +180,7 @@ def cache_aware_func(cmd, *args, **kwargs):
180180
181181@run_shell_cmd_cache
182182def run_shell_cmd (cmd , fail_on_error = True , split_stderr = False , stdin = None , env = None ,
183- hidden = False , in_dry_run = False , verbose_dry_run = False , work_dir = None , shell = True ,
183+ hidden = False , in_dry_run = False , verbose_dry_run = False , work_dir = None , use_bash = True ,
184184 output_file = True , stream_output = False , asynchronous = False , with_hooks = True ,
185185 qa_patterns = None , qa_wait_patterns = None ):
186186 """
@@ -194,7 +194,7 @@ def run_shell_cmd(cmd, fail_on_error=True, split_stderr=False, stdin=None, env=N
194194 :param in_dry_run: also run command in dry run mode
195195 :param verbose_dry_run: show that command is run in dry run mode (overrules 'hidden')
196196 :param work_dir: working directory to run command in (current working directory if None)
197- :param shell : execute command through bash shell (enabled by default)
197+ :param use_bash : execute command through bash shell (enabled by default)
198198 :param output_file: collect command output in temporary output file
199199 :param stream_output: stream command output to stdout
200200 :param asynchronous: run command asynchronously
@@ -270,7 +270,10 @@ def to_cmd_str(cmd):
270270 # use bash as shell instead of the default /bin/sh used by subprocess.run
271271 # (which could be dash instead of bash, like on Ubuntu, see https://wiki.ubuntu.com/DashAsBinSh)
272272 # stick to None (default value) when not running command via a shell
273- executable = '/bin/bash' if shell else None
273+ if use_bash :
274+ executable , shell = '/bin/bash' , True
275+ else :
276+ executable , shell = None , False
274277
275278 stderr = subprocess .PIPE if split_stderr else subprocess .STDOUT
276279
0 commit comments