From 79752b1b87793d482b53cf2b790aba9a31df33eb Mon Sep 17 00:00:00 2001 From: Thomas Piccirello Date: Wed, 11 Dec 2019 18:53:00 -0800 Subject: [PATCH] Don't print version update message if plain flag is specified --- pkg/cmd/root.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go index eea12831..8315b8ed 100644 --- a/pkg/cmd/root.go +++ b/pkg/cmd/root.go @@ -44,10 +44,11 @@ var rootCmd = &cobra.Command{ // disable version checking on the "run" command if version.PerformVersionCheck && cmd.CalledAs() != "run" { silent := utils.GetBoolFlagIfChanged(cmd, "silent", false) + plain := utils.GetBoolFlagIfChanged(cmd, "plain", false) versionCheck := http.CheckCLIVersion(configuration.VersionCheck(), silent, utils.OutputJSON, utils.Debug) if versionCheck != (models.VersionCheck{}) { - shouldPrint := utils.Debug || (!silent && !utils.OutputJSON) + shouldPrint := utils.Debug || (!silent && !plain && !utils.OutputJSON) if version.ProgramVersion != versionCheck.LatestVersion && shouldPrint { fmt.Printf("Doppler CLI version %s is now available\n", versionCheck.LatestVersion) }