spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

--integration-options with an unbalanced quote crashes with a raw ValueError

Open Quratulain-bilal opened this issue 4 months ago • 0 comments

description

_parse_integration_options in src/specify_cli/integrations/_helpers.py calls shlex.split(raw_options) unguarded. an unbalanced quote in the flag value (e.g. --integration-options='--commands-dir "foo') makes shlex raise ValueError: No closing quotation, so a raw traceback escapes instead of the clean typer.Exit(1) error every other bad-input path in this function produces (unknown option, missing value, unexpected value all print a message and exit 1).

reachable from specify init --integration-options=... and every specify integration install/switch/upgrade/migrate --integration-options=....

repro:

specify integration install generic --integration-options='--commands-dir "foo'
# ValueError: No closing quotation  (raw traceback)

expected: a clean one-line error and exit 1, like a mistyped option name already gives.

note: i used an ai assistant to help investigate and write this up.

Quratulain-bilal avatar Jul 10 '26 16:07 Quratulain-bilal