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 17, 2024
1 parent 7dbba36 commit a796156
Show file tree
Hide file tree
Showing 3 changed files with 6 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
5 changes: 4 additions & 1 deletion easybuild/tools/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import os
import re
import signal
import shutil
import subprocess
import sys
import tempfile
Expand Down Expand Up @@ -276,7 +277,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 a796156

Please sign in to comment.