mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-03 04:26:39 +00:00
24 lines
437 B
JavaScript
24 lines
437 B
JavaScript
|
(function() {
|
||
|
var notifier, packageJSON, updateNotifier;
|
||
|
|
||
|
updateNotifier = require('update-notifier');
|
||
|
|
||
|
packageJSON = require('../../package.json');
|
||
|
|
||
|
notifier = updateNotifier({
|
||
|
pkg: packageJSON
|
||
|
});
|
||
|
|
||
|
exports.hasAvailableUpdate = function() {
|
||
|
return notifier != null;
|
||
|
};
|
||
|
|
||
|
exports.notify = function() {
|
||
|
if (!exports.hasAvailableUpdate()) {
|
||
|
return;
|
||
|
}
|
||
|
return notifier.notify();
|
||
|
};
|
||
|
|
||
|
}).call(this);
|