Skip to content

[Bug]: setup-plan.sh silently ignores unknown arguments (ARGS is collected but never read) #4363

Description

@privaloops

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

  1. Initialise a project with the bash scripts (--script sh).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions