diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-03 14:54:55 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-10 00:23:01 +1100 |
commit | 4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch) | |
tree | 90e28657c0af72cd0a880842f88750c01a32834d /pkg/updates | |
parent | 9440dcf9de3214927125693e512cdc941ca4e123 (diff) |
remove viper
WIP
Diffstat (limited to 'pkg/updates')
-rw-r--r-- | pkg/updates/updates.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/updates/updates.go b/pkg/updates/updates.go index ba09b0a4c..4c25e0f63 100644 --- a/pkg/updates/updates.go +++ b/pkg/updates/updates.go @@ -172,14 +172,14 @@ func (u *Updater) skipUpdateCheck() bool { } userConfig := u.Config.GetUserConfig() - if userConfig.Get("update.method") == "never" { + if userConfig.Update.Method == "never" { u.Log.Info("Update method is set to never so we won't check for an update") return true } currentTimestamp := time.Now().Unix() lastUpdateCheck := u.Config.GetAppState().LastUpdateCheck - days := userConfig.GetInt64("update.days") + days := userConfig.Update.Days if (currentTimestamp-lastUpdateCheck)/(60*60*24) < days { u.Log.Info("Last update was too recent so we won't check for an update") |