Merge pull request #1775 from balena-io/check-new-version-before-notify

Only notify of an update if the new version is actually newer
This commit is contained in:
Page- 2020-04-30 14:45:25 +01:00 committed by GitHub
commit 8ac65c3800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,7 +40,10 @@ export function notify() {
}
}
const up = notifier.update;
if (up) {
if (
up &&
(require('semver') as typeof import('semver')).lt(up.current, up.latest)
) {
notifier.notify({
defer: false,
message: `Update available ${up.current}${up.latest}\n