From 96f77ebe5ad703956b8b989af095714c6fd2c6d3 Mon Sep 17 00:00:00 2001 From: yedamo Date: Mon, 9 Aug 2021 18:11:52 +0800 Subject: [PATCH] selfupdate: fix --quiet option, not quite quiet Fixes #5505 --- cmd/selfupdate/selfupdate.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/selfupdate/selfupdate.go b/cmd/selfupdate/selfupdate.go index c730382b7..ec534a714 100644 --- a/cmd/selfupdate/selfupdate.go +++ b/cmd/selfupdate/selfupdate.go @@ -158,7 +158,7 @@ func InstallUpdate(ctx context.Context, opt *Options) error { oldVersion := fs.Version if newVersion == oldVersion { - fmt.Println("rclone is up to date") + fs.Logf(nil, "rclone is up to date") return nil } @@ -169,7 +169,7 @@ func InstallUpdate(ctx context.Context, opt *Options) error { } else { err := installPackage(ctx, opt.Beta, newVersion, siteURL, opt.Package) if err == nil { - fmt.Printf("Successfully updated rclone package from version %s to version %s\n", oldVersion, newVersion) + fs.Logf(nil, "Successfully updated rclone package from version %s to version %s", oldVersion, newVersion) } return err } @@ -221,7 +221,7 @@ func InstallUpdate(ctx context.Context, opt *Options) error { err = replaceExecutable(targetFile, newFile, savedFile) if err == nil { - fmt.Printf("Successfully updated rclone from version %s to version %s\n", oldVersion, newVersion) + fs.Logf(nil, "Successfully updated rclone from version %s to version %s", oldVersion, newVersion) } return err } @@ -297,7 +297,7 @@ func replaceExecutable(targetFile, newFile, savedFile string) error { } } if saveErr == nil { - fmt.Printf("The old executable was saved as %s\n", savedFile) + fs.Infof(nil, "The old executable was saved as %s", savedFile) err = nil } }