I want to use husky to run a shell script to return exit 1
if a user includes the --tags
option in a git push command.
I have husky set up like this in my package.json
"husky": {
"hooks": {
"pre-push": "sh stopTagPush.sh"
}
}
When I run the command git push origin --tags
this runs my script but I don't know how to get access to the value of the git command git push origin --tags
to see if --tags
is present. Is there a git variable that I can use to access the command value inside the script?