Skip to content

fix: restore --force flag and remove -f alias from --format#54

Merged
designcode merged 2 commits intomainfrom
fix/remove-format-f-alias
Mar 30, 2026
Merged

fix: restore --force flag and remove -f alias from --format#54
designcode merged 2 commits intomainfrom
fix/remove-format-f-alias

Conversation

@designcode
Copy link
Copy Markdown
Collaborator

@designcode designcode commented Mar 30, 2026

Summary

  • Removes -f as alias for --format globally — prevents the silent behavior change where -f on rm/mv was interpreted as --format instead of --force
  • Restores --force -f on rm and mv — supports the -rf convention for recursive force delete/move
  • Restores --force (without -f) on 6 destructive commandsbuckets delete, objects delete, access-keys delete, iam policies delete, iam users remove, iam users revoke-invitation for backwards compatibility
  • Excludes auto-generated command-registry.ts from eslint — fixes recurring pre-commit hook failures
  • Enables workflow_dispatch on CI — allows manual integration test runs

Flag layout after this PR

Command Flags
rm, mv --yes -y, --force -f (supports -rf)
buckets delete, objects delete, access-keys delete, iam policies delete, iam users remove, iam users revoke-invitation --yes -y, --force
Everything else --yes -y

Test plan

  • Unit tests pass (474)
  • Integration tests pass (24)
  • Added --force backwards-compat tests for buckets delete and objects delete
  • Run CI integration tests via workflow_dispatch

🤖 Generated with Claude Code


Note

Medium Risk
Changes CLI option parsing/aliases for destructive commands, which can affect scripting and user expectations across many commands. Core operations are unchanged, but flag-resolution regressions are possible if the command registry/spec parsing diverges from these updates.

Overview
Fixes CLI flag/alias behavior for destructive commands. -f is no longer treated as an alias for --format, and getFormat now only reads --format, preventing rm/mv -f from being misinterpreted as output formatting.

Restores/expands force semantics for destructive operations. rm and mv accept --force/-f (in addition to --yes/-y), and several delete/remove commands accept --force as a backwards-compatible alias for --yes; specs.yaml and integration tests are updated accordingly.

Dev tooling/CI tweaks. ESLint now ignores the generated src/command-registry.ts, and GitHub Actions CI adds workflow_dispatch plus allows the integration job to run on manual dispatch as well as pushes.

Written by Cursor Bugbot for commit 453ea27. This will update automatically on new commits. Configure here.

designcode and others added 2 commits March 30, 2026 12:46
… from --format

The previous refactor (auto-inject global arguments) silently changed the
meaning of -f from --force to --format on rm/mv commands. This restores
--force/-f on rm and mv (supporting the -rf convention), adds --force
(without -f alias) back to buckets delete, objects delete, access-keys
delete, iam policies delete, iam users remove, and iam users
revoke-invitation for backwards compatibility, and removes -f as an
alias for --format globally.

Also excludes auto-generated command-registry.ts from eslint.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@designcode designcode merged commit fda4bd0 into main Mar 30, 2026
3 checks passed
@designcode designcode deleted the fix/remove-format-f-alias branch March 30, 2026 11:18
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 2.14.0-beta.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants