Skip to content

Commit

Permalink
Added skip version check before calling beginDetectNewVersion (#2301)
Browse files Browse the repository at this point in the history
  • Loading branch information
gapra-msft authored Jul 24, 2023
1 parent 2e9b32e commit b12d553
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
Expand Down

0 comments on commit b12d553

Please sign in to comment.