Skip to content

fix: honor --force flag in extract subcommand#88

Merged
bug-ops merged 1 commit intomainfrom
extract-force-flag-ignored
Mar 15, 2026
Merged

fix: honor --force flag in extract subcommand#88
bug-ops merged 1 commit intomainfrom
extract-force-flag-ignored

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 15, 2026

Summary

  • The --force flag on the extract subcommand was parsed by clap but never read, causing extraction to always overwrite silently
  • Without --force, extraction now fails with a clear error listing conflicting destination files
  • With --force, existing files are silently overwritten (previous behavior preserved)

Changes

  • crates/exarch-cli/src/commands/extract.rs: added pre-extraction conflict check using list_archive
  • crates/exarch-cli/tests/cli_tests.rs: added 2 integration tests covering both paths
  • CHANGELOG.md: updated [Unreleased]

Test plan

  • cargo +nightly fmt --all -- --check passes
  • cargo clippy --all-targets --all-features --workspace -- -D warnings passes
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features --workspace passes
  • cargo nextest run --workspace --all-features --exclude exarch-python --exclude exarch-node --lib --bins — 511 passed, 3 skipped
  • New test: extract without --force to conflicting destination → fails with actionable error
  • New test: extract with --force to conflicting destination → succeeds

Closes #77

Without --force, extraction now fails with a clear error listing
conflicting destination files. With --force, existing files are
silently overwritten (previous behavior).

Closes #77
@github-actions github-actions bot added core Changes to exarch-core docs Documentation tests Test changes labels Mar 15, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 15, 2026 00:07
@bug-ops bug-ops merged commit 0295699 into main Mar 15, 2026
20 checks passed
@bug-ops bug-ops deleted the extract-force-flag-ignored branch March 15, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Changes to exarch-core docs Documentation tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: extract --force flag is ignored (always overwrites)

1 participant