1 | const { error } = require('@vue/cli-shared-utils')
|
2 |
|
3 | const Upgrader = require('./Upgrader')
|
4 |
|
5 | async function outdated (options, context = process.cwd()) {
|
6 | const upgrader = new Upgrader(context)
|
7 | return upgrader.checkForUpdates(options.next)
|
8 | }
|
9 |
|
10 | module.exports = (...args) => {
|
11 | return outdated(...args).catch(err => {
|
12 | error(err)
|
13 | if (!process.env.VUE_CLI_TEST) {
|
14 | process.exit(1)
|
15 | }
|
16 | })
|
17 | }
|