mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-19 13:47:52 +00:00
Merge pull request #230 from resin-io/jviotti/fix/update
Improve the way the update notifier is shown
This commit is contained in:
commit
7ace4bdfa6
@ -21,8 +21,12 @@
|
||||
if (!exports.hasAvailableUpdate()) {
|
||||
return;
|
||||
}
|
||||
notifier.notify();
|
||||
return console.log('Notice that you might need administrator privileges depending on your setup');
|
||||
notifier.notify({
|
||||
defer: false
|
||||
});
|
||||
if (notifier.update != null) {
|
||||
return console.log('Notice that you might need administrator privileges depending on your setup\n');
|
||||
}
|
||||
};
|
||||
|
||||
}).call(this);
|
||||
|
@ -13,5 +13,6 @@ exports.hasAvailableUpdate = ->
|
||||
|
||||
exports.notify = ->
|
||||
return if not exports.hasAvailableUpdate()
|
||||
notifier.notify()
|
||||
console.log('Notice that you might need administrator privileges depending on your setup')
|
||||
notifier.notify(defer: false)
|
||||
if notifier.update?
|
||||
console.log('Notice that you might need administrator privileges depending on your setup\n')
|
||||
|
Loading…
Reference in New Issue
Block a user