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
The git push hook is designed to determine if push is allowed. If the hook returns non-zero, a red error message is bound to be displayed.
The push hook scripts we use need to run npm version, add a commit record, and execute a git push inside the hook, so it needs to prevent external git push, so it returns non-zero.
But when hook script returns non-zero, bin/hooks/pre-push will report an error, showing Failed to exec pre-push hook script.
If the hook actually ran successfully, we shouldn't show this prompt, so a specific exit code should be defined to identify this situation.
use 42 as a specific exit code
After the hook runs successfully, with 42 as the exit code
When the exit code is 42 found in bin/hooks/*, do not display an error message and exit to git with a non-zero value.
The text was updated successfully, but these errors were encountered:
binsee
added a commit
to binsee/git-scripts
that referenced
this issue
Apr 10, 2022
Link to Chatie/git-scripts#18 (comment)
The git push hook is designed to determine if push is allowed. If the hook returns non-zero, a red error message is bound to be displayed.
The push hook scripts we use need to run
npm version
, add a commit record, and execute agit push
inside the hook, so it needs to prevent externalgit push
, so it returns non-zero.But when hook script returns non-zero,
bin/hooks/pre-push
will report an error, showingFailed to exec pre-push hook script
.If the hook actually ran successfully, we shouldn't show this prompt, so a specific exit code should be defined to identify this situation.
42
as a specific exit code42
as the exit code42
found inbin/hooks/*
, do not display an error message and exit to git with a non-zero value.The text was updated successfully, but these errors were encountered: