mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
--max-transfer - add new exit code (10)
It adds dedicated exit code (10) for --max-duration flag. Rclone will exit with exit code 10 if the duration limit is reached. It behaves in similar fashion as --max-transfer and exit code 8. discussed on the forum: https://forum.rclone.org/t/max-duration-option-is-triggering-exit-with-error/39917/6
This commit is contained in:
committed by
Nick Craig-Wood
parent
3404eb0444
commit
378a2d21ee
@@ -35,6 +35,7 @@ import (
|
||||
fslog "github.com/rclone/rclone/fs/log"
|
||||
"github.com/rclone/rclone/fs/rc/rcflags"
|
||||
"github.com/rclone/rclone/fs/rc/rcserver"
|
||||
fssync "github.com/rclone/rclone/fs/sync"
|
||||
"github.com/rclone/rclone/lib/atexit"
|
||||
"github.com/rclone/rclone/lib/buildinfo"
|
||||
"github.com/rclone/rclone/lib/exitcode"
|
||||
@@ -501,6 +502,8 @@ func resolveExitCode(err error) {
|
||||
os.Exit(exitcode.UncategorizedError)
|
||||
case errors.Is(err, accounting.ErrorMaxTransferLimitReached):
|
||||
os.Exit(exitcode.TransferExceeded)
|
||||
case errors.Is(err, fssync.ErrorMaxDurationReached):
|
||||
os.Exit(exitcode.DurationExceeded)
|
||||
case fserrors.ShouldRetry(err):
|
||||
os.Exit(exitcode.RetryError)
|
||||
case fserrors.IsNoRetryError(err), fserrors.IsNoLowLevelRetryError(err):
|
||||
|
||||
Reference in New Issue
Block a user