Force /bin/bash shell for conda

I have found that conda may use a different shell in some instances, such as /bin/sh. This fix ensures it executes /bin/bash instead.
This commit is contained in:
Thireus ☠ 2024-09-17 20:01:47 +01:00 committed by GitHub
parent a50477ec85
commit dcc3100b38
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: B5690EEEBB952194

View file

@ -190,7 +190,7 @@ def run_cmd(cmd, assert_success=False, environment=False, capture_output=False,
cmd = f'. "{conda_sh_path}" && conda activate "{conda_env_path}" && {cmd}'
# Run shell commands
result = subprocess.run(cmd, shell=True, capture_output=capture_output, env=env)
result = subprocess.run(cmd, shell=True, executable='/bin/bash', capture_output=capture_output, env=env)
# Assert the command ran successfully
if assert_success and result.returncode != 0: