Skip to content

fix: stop forwarding --debug to the legacy CLI - #208

Closed
pjcdawkins wants to merge 4 commits into
mainfrom
fix/debug-flag-legacy
Closed

pjcdawkins wants to merge 4 commits into
mainfrom
fix/debug-flag-legacy

Conversation

@pjcdawkins

Copy link
Copy Markdown
Contributor

The root command's persistent --debug flag was passed through to the legacy PHP CLI, which rejected it: upsun cc --debug printed The "--debug" option does not exist. and exited 1.

  • Strip --debug / --debug=<bool> (before any --) when forwarding args to the legacy CLI: in the root command, the root help function, and the help command.
  • Pass debug mode to the legacy CLI as <PREFIX>DEBUG=1 (or 0), so --debug behaves like the environment variable, and --debug=false overrides an inherited value.
  • The help command does not parse flags, so it now applies --debug itself.
  • _complete still forwards its words unchanged.

🤖 Generated with Claude Code

pjcdawkins and others added 4 commits October 9, 2026 11:36
The root command's persistent --debug flag was passed through to the
legacy PHP CLI, which rejected it ("The "--debug" option does not
exist."). Strip it before the args are forwarded, in the root command
and in both help paths, and pass debug mode to the legacy CLI as
<PREFIX>DEBUG=1 instead, matching the environment variable.

The help command does not parse flags, so it now enables debug mode
itself when --debug is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Otherwise an inherited <PREFIX>DEBUG=1 still enables PHP debug output
when --debug=false is given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The help command does not parse flags, so an explicit false value must
also override <PREFIX>DEBUG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pjcdawkins pjcdawkins closed this Oct 9, 2026
@upsun-dispatch

upsun-dispatch Bot commented Oct 9, 2026

Copy link
Copy Markdown

Note

Upsun Dispatch™ — this review was canceled. No review was posted for this update.

View the full trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant