diff --git a/easybuild/scripts/rpath_wrapper_template.sh.in b/easybuild/scripts/rpath_wrapper_template.sh.in index 55c3388c5b..73eb21f0e0 100644 --- a/easybuild/scripts/rpath_wrapper_template.sh.in +++ b/easybuild/scripts/rpath_wrapper_template.sh.in @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## # Copyright 2016-2023 Ghent University # diff --git a/easybuild/tools/run.py b/easybuild/tools/run.py index 0bb0d3c9f4..9ba15d1da8 100644 --- a/easybuild/tools/run.py +++ b/easybuild/tools/run.py @@ -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 diff --git a/eb b/eb index 402bb87d0a..f427c5e7e7 100755 --- a/eb +++ b/eb @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash ## # Copyright 2009-2023 Ghent University #