Skip to content

CLI: add --continue-on-error for batch operations - #119

Open
Nagaraaa wants to merge 1 commit into
arsenetar:masterfrom
Nagaraaa:cli-continue-on-error
Open

Nagaraaa wants to merge 1 commit into
arsenetar:masterfrom
Nagaraaa:cli-continue-on-error

Conversation

@Nagaraaa

Copy link
Copy Markdown

The CLI stops at the first file error, leaving later files unprocessed. Add --continue-on-error to attempt the rest of the batch while reporting each error on stderr and exiting with status 1 if any operation failed. The default behavior and Python API stay unchanged.

Related to #99: this covers command-line use only, not the requested Python API option.

Validation on Windows with Python 3.14.7:

  • Full test suite: 31 passed, 1 skipped, including 9 new CLI cases covering successful batches, multiple failures, default early exit, verbose output and unexpected exceptions.
  • python -m flake8 send2trash tests and git diff --check passed.
  • A real python -m send2trash subprocess run with a missing file followed by an existing test file confirmed that the default preserves the later file, the new option sends it to the Recycle Bin, and both invocations return status 1.

Linux and macOS have not been tested locally.

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