Still set currentVersion if update checking is disabled

This commit is contained in:
jamesread 2021-11-17 11:48:24 +00:00
parent 7ee404f44c
commit 395c5bea99
1 changed files with 2 additions and 2 deletions

View File

@ -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,