Bug Description
scripts/bash/setup-plan.sh initialises ARGS=() (line 7) and appends every unrecognised argument to it (line 21), but ARGS is never read anywhere in the script's 85 lines. Unknown arguments — including typos of the supported flags — are therefore accepted silently.
The practical consequence: a typo in --json is not reported. The script falls through to the human-readable branch and prints FEATURE_SPEC: ... instead of JSON, so a caller parsing the output as JSON fails later with a confusing error rather than a clear "unknown option".
Note the contrast with its sibling scripts/bash/check-prerequisites.sh, which does reject unknown options:
echo "ERROR: Unknown option '$1'. Use --help for usage information." >&2
Steps to Reproduce
- Initialise a project with the bash scripts (
--script sh).
- Run
.specify/scripts/bash/setup-plan.sh --jsno (a typo of --json).
Expected Behavior
Either an ERROR: Unknown option ... with a non-zero exit, consistent with check-prerequisites.sh, or an actual use for the collected ARGS.
Actual Behavior
Exit 0, plain-text output, no warning at all. The typo is indistinguishable from omitting the flag.
Specify CLI Version
1.0.1 — and still present on main at the time of writing (scripts/bash/setup-plan.sh, lines 7 and 21).
AI Agent
Claude (not agent-specific: the script is shared by all integrations).
Operating System
macOS — not OS-specific.
Bug Description
scripts/bash/setup-plan.shinitialisesARGS=()(line 7) and appends every unrecognised argument to it (line 21), butARGSis never read anywhere in the script's 85 lines. Unknown arguments — including typos of the supported flags — are therefore accepted silently.The practical consequence: a typo in
--jsonis not reported. The script falls through to the human-readable branch and printsFEATURE_SPEC: ...instead of JSON, so a caller parsing the output as JSON fails later with a confusing error rather than a clear "unknown option".Note the contrast with its sibling
scripts/bash/check-prerequisites.sh, which does reject unknown options:Steps to Reproduce
--script sh)..specify/scripts/bash/setup-plan.sh --jsno(a typo of--json).Expected Behavior
Either an
ERROR: Unknown option ...with a non-zero exit, consistent withcheck-prerequisites.sh, or an actual use for the collectedARGS.Actual Behavior
Exit 0, plain-text output, no warning at all. The typo is indistinguishable from omitting the flag.
Specify CLI Version
1.0.1 — and still present on
mainat the time of writing (scripts/bash/setup-plan.sh, lines 7 and 21).AI Agent
Claude (not agent-specific: the script is shared by all integrations).
Operating System
macOS — not OS-specific.