summaryrefslogtreecommitdiffstats
path: root/pkg/updates
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2020-10-03 14:54:55 +1000
committerJesse Duffield <jessedduffield@gmail.com>2020-10-10 00:23:01 +1100
commit4912205adb5e8e245b33b8e0d5581bcf0ec37e8a (patch)
tree90e28657c0af72cd0a880842f88750c01a32834d /pkg/updates
parent9440dcf9de3214927125693e512cdc941ca4e123 (diff)
remove viper
WIP
Diffstat (limited to 'pkg/updates')
-rw-r--r--pkg/updates/updates.go4
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")