Skip to content

Commit 3d3b9c5

Browse files
Merge pull request #17561 from stevekuznetsov/skuznets/fix-init
Use $0 and not $BASH_SOURCE to detect the executable
2 parents b85f660 + c89410a commit 3d3b9c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/lib/init.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ os::log::stacktrace::install
5151
os::util::environment::update_path_var
5252

5353
if [[ -z "${OS_TMP_ENV_SET-}" ]]; then
54-
if [[ "${BASH_SOURCE[0]}" =~ .*\.sh ]]; then
55-
os::util::environment::setup_tmpdir_vars "$( basename "${BASH_SOURCE[0]}" ".sh" )"
54+
if [[ "${0}" =~ .*\.sh ]]; then
55+
os::util::environment::setup_tmpdir_vars "$( basename "${0}" ".sh" )"
5656
else
5757
os::util::environment::setup_tmpdir_vars "shell"
5858
fi

0 commit comments

Comments
 (0)