From 66dae7d908a0aef5dbc084bdabd9b8bf5c382bfe Mon Sep 17 00:00:00 2001 From: Cameron Durham Date: Fri, 28 May 2021 02:00:18 -0700 Subject: [PATCH] Fix double printing --- cmd/root.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index f396c66..a8d5bbd 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -74,8 +74,7 @@ func optionalVersionCheck() { if err != nil { util.DebugPrint(fmt.Sprintf("error reading environment file: %v", err)) checkLatestVersion() - } - if v, ok := opts["version_check"]; !ok || v == "true" { + } else if v, ok := opts["version_check"]; !ok || v == "true" { checkLatestVersion() } else { util.DebugPrint(fmt.Sprintf("local package version: %s\nlatest version: %s\n", version.PkgVersion, v))