Skip to content

Commit

Permalink
Fix path for searching npm-installed binary when in worktree (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek authored May 18, 2021
1 parent 8fe6b50 commit 12ad491
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -t 1 ] ; then
exec < /dev/tty ; # <- enables interactive shell
fi

dir="$(cd "$(dirname "$(dirname "$(dirname "$0")")")" >/dev/null 2>&1 || exit ; pwd -P)"
dir="$(git rev-parse --show-toplevel)"

call_lefthook()
{
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -t 1 ] ; then
exec < /dev/tty ; # <- enables interactive shell
fi

dir="$(cd "$(dirname "$(dirname "$(dirname "$0")")")" >/dev/null 2>&1 || exit ; pwd -P)"
dir="$(git rev-parse --show-toplevel)"

call_lefthook()
{
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -t 1 ] ; then
exec < /dev/tty ; # <- enables interactive shell
fi

dir="$(cd "$(dirname "$(dirname "$(dirname "$0")")")" >/dev/null 2>&1 || exit ; pwd -P)"
dir="$(git rev-parse --show-toplevel)"

call_lefthook()
{
Expand Down

0 comments on commit 12ad491

Please sign in to comment.