From c0b0c8e2f81c208be511e1266e772d978371e83a Mon Sep 17 00:00:00 2001 From: Gauri Prasad Date: Wed, 19 Jul 2023 15:45:17 -0700 Subject: [PATCH] Added skip version check before calling beginDetectNewVersion --- cmd/root.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index ee62aba1e..596aebf1a 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -192,13 +192,15 @@ func Execute(logPathFolder, jobPlanFolder string, maxFileAndSocketHandles int, j if err := rootCmd.Execute(); err != nil { glcm.Error(err.Error()) } else { - // our commands all control their own life explicitly with the lifecycle manager - // only commands that don't explicitly exit actually reach this point (e.g. help commands and login commands) - select { - case <-beginDetectNewVersion(): - // noop - case <-time.After(time.Second * 8): - // don't wait too long + if !azcopySkipVersionCheck { + // our commands all control their own life explicitly with the lifecycle manager + // only commands that don't explicitly exit actually reach this point (e.g. help commands and login commands) + select { + case <-beginDetectNewVersion(): + // noop + case <-time.After(time.Second * 8): + // don't wait too long + } } glcm.Exit(nil, common.EExitCode.Success()) }