@biffo/cli 0.298.23 → 0.298.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/claim.sh +15 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.298.23",
3
+ "version": "0.298.25",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/scripts/claim.sh CHANGED
@@ -243,6 +243,21 @@ while [ $# -gt 0 ]; do
243
243
  shift 2
244
244
  ;;
245
245
  -h | --help) usage ;;
246
+ -*)
247
+ # An unrecognized flag must never fall into the catch-all below (#1741).
248
+ # It used to: a token that starts with `-` but matches none of the
249
+ # cases above fell straight into `*) ISSUE="$1"; shift ;;`, so
250
+ # `--bogus` silently became the "issue number" -- corrupting ISSUE with
251
+ # flag text instead of the real positional argument -- and the script
252
+ # went on to fail the `[!0-9]*` check below with "give an issue
253
+ # number", a message that describes the SYMPTOM (ISSUE is not
254
+ # numeric) and hides the actual CAUSE (an unsupported flag was typed).
255
+ # Refusing here, at the point the flag is actually unrecognized, says
256
+ # what is really wrong instead of a confusing knock-on error.
257
+ echo "${RED}claim: unrecognized flag '$1'${OFF}" >&2
258
+ echo "${DIM} Known flags: -R/--repo, --check, --as, --release, --guard, -h/--help.${OFF}" >&2
259
+ exit 2
260
+ ;;
246
261
  *)
247
262
  ISSUE="$1"
248
263
  shift