The case pattern globs on =*, so ./down.sh --no-prune falls through to the catch-all and exits 1.
The problem
--purge)
PURGE=true
shift
;;
--non-interactive=*)
NON_INTERACTIVE_MODE="${i#*=}"
shift
;;
--no-prune=*)
PRUNE=false
shift
;;
*)
echo "Unexpected option: $1"
exit 1
--purge two cases above is the bare-flag form; --no-prune is written in the value-taking form but discards the value. So the one spelling that reads naturally is rejected, and --no-prune=true parses and sets PRUNE=false.
Why it matters
Skipping the prune is only reachable by passing an = and a value that is then ignored. The failure is loud (Unexpected option), so this costs a retry rather than silently pruning.
The case pattern globs on
=*, so./down.sh --no-prunefalls through to the catch-all and exits 1.The problem
--purge) PURGE=true shift ;; --non-interactive=*) NON_INTERACTIVE_MODE="${i#*=}" shift ;; --no-prune=*) PRUNE=false shift ;; *) echo "Unexpected option: $1" exit 1--purgetwo cases above is the bare-flag form;--no-pruneis written in the value-taking form but discards the value. So the one spelling that reads naturally is rejected, and--no-prune=trueparses and setsPRUNE=false.Why it matters
Skipping the prune is only reachable by passing an
=and a value that is then ignored. The failure is loud (Unexpected option), so this costs a retry rather than silently pruning.