fix(tools/git): -h/--help now exits 0 across 7 wrappers (#701)
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:
@@ -72,7 +72,7 @@ Examples:
|
||||
$(basename "$0") -t "Fix login bug" -l "bug,priority-high"
|
||||
$(basename "$0") -t "Add dark mode" -b "Implement theme switching" -m "0.2.0"
|
||||
EOF
|
||||
exit 1
|
||||
exit "${1:-1}"
|
||||
}
|
||||
|
||||
# Parse arguments
|
||||
@@ -95,7 +95,7 @@ while [[ $# -gt 0 ]]; do
|
||||
shift 2
|
||||
;;
|
||||
-h|--help)
|
||||
usage
|
||||
usage 0
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
|
||||
Reference in New Issue
Block a user