From 0b9b65ef886b1ea0bd285a6a1900aae0c7fac281 Mon Sep 17 00:00:00 2001 From: Heath Raftery Date: Thu, 26 Jan 2023 14:15:43 +1100 Subject: [PATCH] patch: Clarify update rate of update notifier info If the cli has not been run in a while, it will show old update information. It's not obvious why, and this might lead to confusion. So this commit just adds a comment to clarify that out-of-date update notifier info is expected behaviour, and why. --- lib/utils/update.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/utils/update.ts b/lib/utils/update.ts index d81c0692..caf1ca2e 100644 --- a/lib/utils/update.ts +++ b/lib/utils/update.ts @@ -19,8 +19,10 @@ import * as UpdateNotifier from 'update-notifier'; import packageJSON = require('../../package.json'); -// Check for an update once a day. 1 day granularity should be -// enough, rather than every run. +// Check for an update at most once a day. 1 day granularity should be +// enough, rather than every run. Note because we show the information +// from the *last* time we ran, if the cli has not been run for a while +// the update info can be out of date. const balenaUpdateInterval = 1000 * 60 * 60 * 24 * 1; let notifier: UpdateNotifier.UpdateNotifier;