You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): replace broken --dry-run with meaningful preview output
The --dry-run flag was completely broken across all 43+ commands - it just
exited immediately with "[DryRun]: Bailing now" without showing users what
would happen. This made the flag useless for its intended purpose.
Changes:
- Add new dry-run output utilities in src/utils/dry-run/output.mts
- Fix all read-only commands to show "Would fetch <resource>" message
- Fix all write commands to show detailed preview of actions
- Fix critical commands (fix, optimize, scan create) with comprehensive previews
Read-only commands now explain they're non-destructive:
[DryRun]: Would fetch analytics data
This is a read-only operation that does not modify any data.
Write commands now show what would happen:
[DryRun]: Would upload CI scan
Details:
organizationSlug: "my-org"
branchName: "main"
targets: ["."]
Critical commands (fix, optimize) show detailed action plans:
[DryRun]: Analyze and compute fixes for 3 vulnerabilities
Actions that would be performed:
- [fetch] Scan project dependencies
- [modify] Update package manifest files
- [execute] Run package manager to install
Commands updated:
- analytics, audit-log, config/*, organization/*, package/*, repository/*
- scan/create, scan/del, scan/diff, scan/github, scan/list, scan/metadata
- scan/reach, scan/report, scan/setup, scan/view, threat-feed
- fix, optimize, ci, login, logout, oops, wrapper
- npm, npx, pnpm, yarn, raw-npm, raw-npx, sfw, pycli
- manifest/auto, manifest/cdxgen, manifest/conda, manifest/gradle
- manifest/kotlin, manifest/scala, manifest/setup
- install/completion, uninstall/completion
0 commit comments