You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Husky hooks don't provide a good error message if node_modules doesn't exist. When the hook is executed, yarn run by husky.sh in .git/hooks prints error Command "husky-run" not found.
What should happen:
It should print the Can't find Husky, skipping $hookName hook message and skip the hook, without failing. Probably the reason for this issue is that yarn's run command returns 1 as its exit code in this situation, and not 127 that husky.sh checks against.
The text was updated successfully, but these errors were encountered:
OS: macOS 10.15.3 (also happens on Linux)
Git: 2.26.0
Husky: 4.2.3
Yarn: 1.22.1
Husky hooks don't provide a good error message if
node_modules
doesn't exist. When the hook is executed,yarn
run byhusky.sh
in.git/hooks
printserror Command "husky-run" not found.
What should happen:
It should print the
Can't find Husky, skipping $hookName hook
message and skip the hook, without failing. Probably the reason for this issue is that yarn's run command returns1
as its exit code in this situation, and not127
thathusky.sh
checks against.The text was updated successfully, but these errors were encountered: