fix(tools/git): -h/--help now exits 0 across 7 wrappers (#701)
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful

usage() hard-coded exit 1, so every --help/-h invocation on
issue-assign, issue-create, issue-list, milestone-create, pr-create,
pr-list, and pr-merge exited nonzero, logging phantom isError records
across fleet lanes and breaking set -e composition. usage() now takes
an exit-code arg (default 1); the -h|--help case calls usage 0. All
other error paths are untouched.

Closes #701
This commit is contained in:
Hermes Agent
2026-07-11 04:16:29 -05:00
parent 4df38f7e81
commit ab643e70ff
8 changed files with 67 additions and 14 deletions

View File

@@ -33,7 +33,7 @@ Examples:
$(basename "$0") -i 42 -l "in-progress" -m "0.2.0"
$(basename "$0") -i 42 -a @me
EOF
exit 1
exit "${1:-1}"
}
# Parse arguments
@@ -60,7 +60,7 @@ while [[ $# -gt 0 ]]; do
shift
;;
-h|--help)
usage
usage 0
;;
*)
echo "Unknown option: $1" >&2