Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 23, 2024
1 parent b429760 commit a31e19b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions husky.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ done

[ "$HUSKY" = "0" ] && exit 0

[ "${SHELL##*/}" = "zsh" ] && sh="zsh" || sh="sh"

# shellcheck disable=SC2155
[ "$h" = "pre-commit" ] && export STAGED="$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')"
export PATH="./node_modules/.bin:$PATH"

$sh -e "$s" "$@"
sh -e "$s" "$@"
c=$?

[ $c != 0 ] && echo "husky - $h script failed (code $c)"
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ export default (d = '.husky') => {
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\${0%/*}/h"`, { mode: 0o755 }))
w(_('husky.sh'), '')
return ''
}
}

0 comments on commit a31e19b

Please sign in to comment.