Browse Source

Brought the update notification back

master
Leo Lamprecht 8 years ago
parent
commit
5d3d9d4f37
  1. 16
      bin/now.js

16
bin/now.js

@ -26,17 +26,15 @@ try {
// Utilities
const pkg = require('../lib/pkg')
if (!process.pkg) {
const notifier = updateNotifier({ pkg })
const update = notifier.update
const notifier = updateNotifier({ pkg })
const update = notifier.update
if (update) {
let message = `Update available! ${chalk.red(update.current)}${chalk.green(update.latest)} \n`
message += `Run ${chalk.magenta('npm i -g now')} to update!\n`
message += `${chalk.magenta('Changelog:')} https://github.com/zeit/now-cli/releases/tag/${update.latest}`
if (update) {
let message = `Update available! ${chalk.red(update.current)}${chalk.green(update.latest)} \n`
message += `Run ${chalk.magenta('npm i -g now')} to update!\n`
message += `${chalk.magenta('Changelog:')} https://github.com/zeit/now-cli/releases/tag/${update.latest}`
notifier.notify({ message })
}
notifier.notify({ message })
}
// This command will be run if no other sub command is specified

Loading…
Cancel
Save