fix(husky): correct pre-push exit code to avoid duplicate pushes
This commit is contained in:
@@ -37,9 +37,10 @@ do
|
||||
|
||||
echo "✨ Success! The hook synchronized the versions and pushed the updated tag for you."
|
||||
echo "ℹ️ Note: The original push command was aborted in favor of the auto-push. This is normal."
|
||||
exit 0 # Change to exit 0 to not show as an 'error' in vscode/terminal, though original push will still be technically 'failed' by git
|
||||
exit 1 # We MUST exit 1 here to stop git from proceeding with the original push which would fail
|
||||
else
|
||||
echo "✨ Versions already in sync for $TAG."
|
||||
exit 0 # Allow git to proceed with the original push since we didn't do it ourselves
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user