Support showing exit codes with --show-rc #89
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Please implement
--show-rcto show the exit code of the borg commands.https://borgbackup.readthedocs.io/en/stable/man_intro.html?highlight=rc#return-codes
Could you comment as to what you're using the exit codes for? For instance, if you're programmatically parsing the exit codes for some purpose, I want to make sure I don't prevent you from doing that even if this is implemented by interleaving borgmatic logs. Thanks!
I was debugging my borgmatic systemd timer which failed each time because of a non-0 exit code. I wanted to look in the logs which code it was.
Got it, thanks. Do you think it would make sense to just always pass the
--show-rccode to Borg when borgmatic's-v 2verbosity option is specified? I'm suggesting that because it sounds like a debugging/verbosity aide.I went ahead and implemented that. It'll be part of the next release. Note that even without this, I believe that borgmatic logs Borg's exit code in the case that Borg errors. Example:
Released as part of borgmatic 1.2.3!