fix: better handle spaces in PATH

This commit is contained in:
typicode
2024-07-26 20:01:10 +02:00
committed by GitHub
parent d50b78eff6
commit 399fb6a0a7
+2 -2
View File
@@ -13,10 +13,10 @@ i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
[ "${HUSKY-}" = "0" ] && exit 0
export PATH=node_modules/.bin:$PATH
export PATH="node_modules/.bin:$PATH"
sh -e "$s" "$@"
c=$?
[ $c != 0 ] && echo "husky - $n script failed (code $c)"
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
exit $c
exit $c