diff --git a/cmd/update-main.go b/cmd/update-main.go index 9e0feba26..5adb2bba4 100644 --- a/cmd/update-main.go +++ b/cmd/update-main.go @@ -44,7 +44,7 @@ var updateCmd = cli.Command{ Flags: []cli.Flag{ cli.BoolFlag{ Name: "quiet", - Usage: "Disable any update messages.", + Usage: "Disable any update prompt message.", }, }, CustomHelpTemplate: `Name: @@ -63,7 +63,7 @@ EXIT STATUS: EXAMPLES: 1. Check and update minio: - $ {{.HelpName} + $ {{.HelpName}} `, } @@ -476,7 +476,7 @@ func shouldUpdate(quiet bool, sha256Hex string, latestReleaseTime time.Time) (ok var greenColorSprintf = color.New(color.FgGreen, color.Bold).SprintfFunc() -func mainUpdate(ctx *cli.Context) error { +func mainUpdate(ctx *cli.Context) { if len(ctx.Args()) != 0 { cli.ShowCommandHelpAndExit(ctx, "update", -1) } @@ -498,7 +498,7 @@ func mainUpdate(ctx *cli.Context) error { // Nothing to update running the latest release. if updateMsg == "" { log.Println(greenColorSprintf("You are already running the most recent version of ‘minio’.")) - return nil + os.Exit(0) } log.Println(updateMsg) @@ -512,6 +512,6 @@ func mainUpdate(ctx *cli.Context) error { os.Exit(-1) } log.Println(successMsg) + os.Exit(1) } - return nil }