Skip to content

Add control over overwrites for non-interactive use - #47

Open
thompsonmj wants to merge 5 commits into
mainfrom
feat/force-flag
Open

Add control over overwrites for non-interactive use#47
thompsonmj wants to merge 5 commits into
mainfrom
feat/force-flag

Conversation

@thompsonmj

Copy link
Copy Markdown
Collaborator

Addresses #11, using the approach outlined in option number three from this comment.

  • Default behavior: does not overwrite existing output file
  • Add a flag to Python API and CLI that would enable forcing the overwrite (force=True and -f / --force)
    • This will make updating cautious-robot necessary at an upstream arg or directly here.
  • Add a clear error message with instructions in case of such an event
  • README ocumentation and tests

thompsonmj and others added 5 commits July 27, 2026 13:54
Refuse to overwrite an existing output file by default in both the
library and the CLI, per the consensus on #11 (option 3):

- get_checksums gains force=False and raises OutputFileExistsError
  (subclass of FileExistsError) before any walking or hashing when the
  output file exists
- CLI replaces the interactive overwrite prompt with -f/--force and a
  clear error message, making all runs non-interactive

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@thompsonmj
thompsonmj requested a review from egrace479 July 27, 2026 21:24
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