Преглед изворни кода

Still set currentVersion if update checking is disabled

jamesread пре 4 година
родитељ
комит
395c5bea99
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      internal/updatecheck/updateCheck.go

+ 2 - 2
internal/updatecheck/updateCheck.go

@@ -41,13 +41,13 @@ func machineID() string {
 // StartUpdateChecker will start a job that runs periodically, checking
 // for updates.
 func StartUpdateChecker(currentVersion string, currentCommit string, cfg *config.Config) {
+	CurrentVersion = currentVersion
+
 	if !cfg.CheckForUpdates {
 		log.Warn("Update checking is disabled")
 		return
 	}
 
-	CurrentVersion = currentVersion
-
 	payload := updateRequest{
 		CurrentVersion: currentVersion,
 		CurrentCommit:  currentCommit,