From 1551a85e450e84d1901c80882e44f451dba691b4 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer <maxim.cournoyer@savoirfairelinux.com> Date: Tue, 9 Mar 2021 11:02:34 -0500 Subject: [PATCH] scripts: Do not hard-code /bin/bash. Instead, use Bash from PATH. This approach works more reliably on distributions not strictly adhering to the File Hierarchy Standard (FHS) such as Guix System or NixOS. Change-Id: Ic7b168d0f4d73f3a1cb1085e9a84600a25d153c5 --- scripts/format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/format.sh b/scripts/format.sh index ebd3774a..55028dcf 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -51,7 +51,7 @@ install_hook() exit 1 fi echo Installing pre-commit hook in "$hooks_path" - echo "/bin/bash $(realpath $0)" > "$hooks_path"/pre-commit + echo "$(realpath $0)" > "$hooks_path"/pre-commit chmod +x "$hooks_path"/pre-commit } -- GitLab