Skip to content

forget: return exit code 3 on partial removal of snapshots#5322

Merged
MichaelEischer merged 2 commits into
restic:masterfrom
zmanda:fix-gh-5233-forget-failure-exit-codes
Mar 31, 2025
Merged

forget: return exit code 3 on partial removal of snapshots#5322
MichaelEischer merged 2 commits into
restic:masterfrom
zmanda:fix-gh-5233-forget-failure-exit-codes

Conversation

@konidev20

Copy link
Copy Markdown
Contributor

What does this PR change? What problem does it solve?

Before this change, forget command returns exit code of 0 even if it's not able to remove all the selected snapshots, when using it with the --prune flag.

With this change, the forget command will return an exit code of 3 if it's not able to remove all the selected snapshots.

Was the change previously discussed in an issue or on the forum?

Closes #5233

Also, discussed in #5140, #5254

Checklist

  • I have added tests for all code changes.
  • I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • I'm done! This pull request is ready for review.

@MichaelEischer MichaelEischer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Thanks!

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.

forget currently exits with an exit code 0 even if some snapshots couldn't be removed

2 participants