-
Notifications
You must be signed in to change notification settings - Fork 15
[CLI]: Allow --headless and --dry-run to be used together #3114
Copy link
Copy link
Labels
cliCLI feature or bugCLI feature or bugenhancementNew feature or requestNew feature or requestsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processingunder-reviewIssue is being reviewed by the teamIssue is being reviewed by the team
Description
What would you like?
Currently spawn status --headless --dry-run (and likely other commands) rejects the combination with:
{"status":"error","error_code":"VALIDATION_ERROR","error_message":"--headless and --dry-run cannot be used together"}
These two flags should be allowed together. --dry-run previews what would happen, and --headless means no interactive prompts / machine-readable output. Combining them is a valid use case — e.g. a CI pipeline that wants a structured preview of what a command would do without actually executing it.
Current behavior
The validation at packages/cli/src/index.ts:1043 explicitly blocks the combination.
Desired behavior
Remove the mutual-exclusion check so both flags can be passed simultaneously. --dry-run should still skip execution, and --headless should still suppress interactive prompts / emit structured output.
Filed from Slack by SPA
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
cliCLI feature or bugCLI feature or bugenhancementNew feature or requestNew feature or requestsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processingunder-reviewIssue is being reviewed by the teamIssue is being reviewed by the team