From 26b1f8dfdb06acbd8e188144427d312e517a48df Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 13 Aug 2020 14:26:37 -0700 Subject: [PATCH] Do not automatically update to unstable release fixes #726 --- src/cron.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cron.js b/src/cron.js index 4e17e28c6..b738f3607 100644 --- a/src/cron.js +++ b/src/cron.js @@ -201,12 +201,10 @@ function boxAutoupdatePatternChanged(pattern, tz) { cronTime: pattern, onTick: function() { var updateInfo = updateChecker.getUpdateInfo(); - if (updateInfo.box) { - debug('Starting autoupdate to %j', updateInfo.box); - updater.updateToLatest({ skipBackup: false }, auditSource.CRON, NOOP_CALLBACK); - } else { - debug('No box auto updates available'); - } + if (!updateInfo.box) return debug('No box auto updates available'); + if (updateInfo.box.unstable) return debug('Will not auto-update to unstable release'); + debug('Starting autoupdate to %j', updateInfo.box); + updater.updateToLatest({ skipBackup: false }, auditSource.CRON, NOOP_CALLBACK); }, start: true, timeZone: tz