File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -42,8 +42,14 @@ const (
4242 ScheduleLockModeOptionIgnore = "ignore"
4343)
4444
45+ // Exit codes from restic
4546const (
46- ExitCodeSuccess = 0
47- ExitCodeError = 1
48- ExitCodeWarning = 3
47+ ResticExitCodeSuccess = 0
48+ ResticExitCodeError = 1
49+ ResticExitCodeGoRuntimeError = 2
50+ ResticExitCodeWarning = 3
51+ ResticExitCodeNoRepository = 10
52+ ResticExitCodeFailLockRepository = 11
53+ ResticExitCodeWrongPassword = 12
54+ ResticExitCodeInterrupted = 130
4955)
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ func IsWarning(err error) bool {
1717 }
1818 exitErr := & exec.ExitError {}
1919 if errors .As (err , & exitErr ) {
20- return exitErr .ExitCode () == constants .ExitCodeWarning
20+ return exitErr .ExitCode () == constants .ResticExitCodeWarning
2121 }
2222 // so far, internal warning is only used in unit tests
2323 warn := & InternalWarningError {}
You can’t perform that action at this time.
0 commit comments