Skip to content

Commit

Permalink
chore(project): ensure git hooks don't error-exit when there's nothin…
Browse files Browse the repository at this point in the history
…g to do

Prevents `"Could not detach HEAD"` errors on interactive rebases.
  • Loading branch information
cueedee committed Oct 20, 2017
1 parent d88e8b4 commit b78c926
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .git-hooks/git-hook-on-npm-lockfile-change.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ function changed
echo "${changed_files}" | grep --quiet "${1}"
}

changed package-lock.json && npm run refresh
if changed package-lock.json ; then
npm run refresh
fi

0 comments on commit b78c926

Please sign in to comment.