balena-cli/lib/utils/update.coffee

12 lines
268 B
CoffeeScript
Raw Normal View History

updateNotifier = require('update-notifier')
packageJSON = require('../../package.json')
notifier = updateNotifier(pkg: packageJSON)
exports.hasAvailableUpdate = ->
return notifier?
exports.notify = ->
return if not exports.hasAvailableUpdate()
notifier.notify()