From e94b90b53cd3ed8fbf2b0953c9b0b2a68fee4a29 Mon Sep 17 00:00:00 2001 From: z30001483 <37854724+dormanze@users.noreply.github.com> Date: Fri, 12 Sep 2025 14:05:31 +0800 Subject: [PATCH] put/get cmd fails to execute return non-zero exit code --- cmd/get-main.go | 5 +++-- cmd/put-main.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/get-main.go b/cmd/get-main.go index 43060a1e16..4d729541d9 100644 --- a/cmd/get-main.go +++ b/cmd/get-main.go @@ -136,6 +136,7 @@ func mainGet(cliCtx *cli.Context) (e error) { if urls.Error != nil { e = urls.Error.ToGoError() showLastProgressBar(pg, e) + fatalIf(urls.Error.Trace(), "Unable to download.") return } } @@ -151,10 +152,10 @@ func printGetURLsError(cpURLs *URLs) { if strings.Contains(cpURLs.Error.ToGoError().Error(), " is a folder.") { - errorIf(cpURLs.Error.Trace(), + fatalIf(cpURLs.Error.Trace(), "Folder cannot be copied. Please use `...` suffix.") } else { - errorIf(cpURLs.Error.Trace(), + fatalIf(cpURLs.Error.Trace(), "Unable to download.") } } diff --git a/cmd/put-main.go b/cmd/put-main.go index 14c4c3e94e..8695433111 100644 --- a/cmd/put-main.go +++ b/cmd/put-main.go @@ -226,10 +226,10 @@ func printPutURLsError(putURLs *URLs) { } if strings.Contains(putURLs.Error.ToGoError().Error(), " is a folder.") { - errorIf(putURLs.Error.Trace(), + fatalIf(putURLs.Error.Trace(), "Folder cannot be copied. Please use `...` suffix.") } else { - errorIf(putURLs.Error.Trace(), + fatalIf(putURLs.Error.Trace(), "Unable to upload.") } }