Skip to content

Reject combined forced usage#2155

Merged
lra merged 1 commit into
masterfrom
avoid_2_forces
Feb 16, 2026
Merged

Reject combined forced usage#2155
lra merged 1 commit into
masterfrom
avoid_2_forces

Conversation

@lra
Copy link
Copy Markdown
Owner

@lra lra commented Feb 16, 2026

Reject combined usage early (exit with clear message).

Reject combined usage early (exit with clear message).
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds validation to reject the combined usage of the mutually exclusive command-line options --force and --force-no. The implementation exits early with a clear error message when both flags are provided together, preventing conflicting behavior where the application would try to automatically answer "yes" and "no" to prompts simultaneously.

Changes:

  • Added early validation in main() to detect and reject combined --force and --force-no usage
  • Added test coverage for the mutually exclusive flags validation
  • Updated test setUp/tearDown to properly initialize and reset the FORCE_NO flag

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/mackup/main.py Added validation check to exit early when both --force and --force-no flags are provided
tests/test_cli.py Added test case for mutually exclusive flags validation and updated setUp/tearDown to initialize/reset FORCE_NO flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lra lra merged commit 52c7b94 into master Feb 16, 2026
43 checks passed
@lra lra deleted the avoid_2_forces branch February 16, 2026 23:54
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.

2 participants