Skip to content

Commit

Permalink
fix: Double quote eval statements with $dir (#404)
Browse files Browse the repository at this point in the history
Co-authored-by: Justin Foell <[email protected]>
Closes #403
  • Loading branch information
jrfoell authored Dec 19, 2022
1 parent c7b8cc3 commit b05b393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ call_lefthook()
{{end -}}
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
eval "$dir/node_modules/lefthook/bin/index.js $@"
eval "\"$dir/node_modules/lefthook/bin/index.js\" $@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}"
then
eval "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}} $@"
eval "\"$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}\" $@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}"
then
eval "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}} $@"
eval "\"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}\" $@"
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook $@
Expand Down

0 comments on commit b05b393

Please sign in to comment.