summaryrefslogtreecommitdiff
path: root/hooks/run-hook.cmd
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2025-12-03 10:14:19 -0800
committerJesse Vincent <jesse@fsck.com>2025-12-03 10:14:19 -0800
commit154d664373569a83289684d7b01742a82cca4eaf (patch)
tree69ba9dc482952a9f106268230cee39613921138d /hooks/run-hook.cmd
parent8462c20cce0ca37ff747d80fde4697fd45a98189 (diff)
Release v3.6.2: Fix Linux compatibility in polyglot hook wrapperv3.6.2
Fixed POSIX compatibility issue in hooks/run-hook.cmd that caused "Bad substitution" errors on Ubuntu/Debian systems where /bin/sh is dash. Changes: - Replaced bash-specific ${BASH_SOURCE[0]:-$0} with POSIX-compliant $0 - Tested with both bash and sh (POSIX mode) on macOS - Updated version to 3.6.2 in all required files Fixes #141
Diffstat (limited to 'hooks/run-hook.cmd')
-rwxr-xr-xhooks/run-hook.cmd2
1 files changed, 1 insertions, 1 deletions
diff --git a/hooks/run-hook.cmd b/hooks/run-hook.cmd
index 33d2e2a..8d8458f 100755
--- a/hooks/run-hook.cmd
+++ b/hooks/run-hook.cmd
@@ -13,7 +13,7 @@ exit /b
CMDBLOCK
# Unix shell runs from here
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
+SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_NAME="$1"
shift
"${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"