Skip to content

Commit

Permalink
don't hardcode /bin/bash in eb script, RPATH wrapper script, and run_…
Browse files Browse the repository at this point in the history
…shell_cmd
  • Loading branch information
boegel committed Jan 16, 2024
1 parent 7dbba36 commit 6adfa75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion easybuild/scripts/rpath_wrapper_template.sh.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
# Copyright 2016-2023 Ghent University
#
Expand Down
4 changes: 3 additions & 1 deletion easybuild/tools/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,9 @@ def to_cmd_str(cmd):
# (which could be dash instead of bash, like on Ubuntu, see https://wiki.ubuntu.com/DashAsBinSh)
# stick to None (default value) when not running command via a shell
if use_bash:
executable, shell = '/bin/bash', True
bash = shutil.which('bash')
_log.info(f"Path to bash that will be used to run shell commands: {bash}")
executable, shell = bash, True
else:
executable, shell = None, False

Expand Down
2 changes: 1 addition & 1 deletion eb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##
# Copyright 2009-2023 Ghent University
#
Expand Down

0 comments on commit 6adfa75

Please sign in to comment.