Skip to content

chore(cli): remove dead --prune/-e flags from parseArgs - #6163

Merged
pedrofrxncx merged 1 commit into
mainfrom
chore/remove-dead-cli-flags-w2
Aug 18, 2026
Merged

chore(cli): remove dead --prune/-e flags from parseArgs#6163
pedrofrxncx merged 1 commit into
mainfrom
chore/remove-dead-cli-flags-w2

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

The desktop link feature (the only consumer of --prune and -e/--env) was removed in #5570 ("chore(link): remove the desktop link feature"), but that PR left the two flag definitions dangling in apps/api/src/cli.ts's parseArgs options — they're accepted on the command line but never read anywhere (values.prune / values.env have zero references), and neither appears in the --help output.

A maintainer wants this because dead CLI flags are misleading: they silently accept --prune/-e <value> and do nothing, which is confusing for anyone poking at deco --help or grepping the source for what a flag does.

Net change: -5 lines, 0 added. Confirmed dead via grep -rn "values\.prune\|values\.env" apps/api/src/ (no hits) and by reading the git history of cli.ts back to the commit that introduced them for the link command.

A reviewer can confirm with:

grep -n "prune\|env: { type" apps/api/src/cli.ts

(no matches after this change) and cd apps/api && bunx tsc --noEmit.

Locally verified: bun run fmt, cd apps/api && bunx tsc --noEmit (clean), bunx oxlint src/cli.ts (0 warnings/errors). No test exercises these flags (there's no cli.test.ts), so this is a pure dead-code deletion — full CI validates the rest.


Summary by cubic

Removes the unused CLI flags --prune and -e/--env from apps/api/src/cli.ts’s parseArgs. These flags belonged to the removed desktop link feature; they were previously accepted but no-ops and are now unrecognized to prevent confusion.

  • Old vs new behavior: previously accepted and ignored; now not recognized. If your scripts pass these flags, remove them—there is no replacement.
  • Review: only deletes the two option definitions (-5 lines). Verify with grep in cli.ts; typecheck remains clean.
  • Help output is unchanged (these flags weren’t listed).

Written for commit 1e8b3b0. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx enabled auto-merge (squash) August 18, 2026 14:09
@pedrofrxncx
pedrofrxncx merged commit 7df453e into main Aug 18, 2026
25 checks passed
@pedrofrxncx
pedrofrxncx deleted the chore/remove-dead-cli-flags-w2 branch August 18, 2026 14:10
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