From 395c5bea99a3e67d6c12dd222a6ab4847db5161b Mon Sep 17 00:00:00 2001 From: jamesread Date: Wed, 17 Nov 2021 11:48:24 +0000 Subject: [PATCH] Still set currentVersion if update checking is disabled --- internal/updatecheck/updateCheck.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/updatecheck/updateCheck.go b/internal/updatecheck/updateCheck.go index a59c90f..63cb469 100644 --- a/internal/updatecheck/updateCheck.go +++ b/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,