mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-30 09:27:13 +00:00
fix: exit with proper error code on errors (#4806)
This commit is contained in:
parent
25fd1d8dfc
commit
a7ba73ed13
@ -24,3 +24,7 @@ require('@babel/register')({
|
|||||||
|
|
||||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||||
require('@nuxt/cli' + suffix).run()
|
require('@nuxt/cli' + suffix).run()
|
||||||
|
.catch((error) => {
|
||||||
|
require('consola').fatal(error)
|
||||||
|
process.exit(2)
|
||||||
|
})
|
||||||
|
@ -6,3 +6,7 @@ if (process.argv[2] !== 'start') {
|
|||||||
|
|
||||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||||
require('@nuxt/cli' + suffix).run()
|
require('@nuxt/cli' + suffix).run()
|
||||||
|
.catch((error) => {
|
||||||
|
require('consola').fatal(error)
|
||||||
|
process.exit(2)
|
||||||
|
})
|
||||||
|
@ -12,3 +12,7 @@ require('ts-node').register({
|
|||||||
|
|
||||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||||
require('@nuxt/cli' + suffix).run()
|
require('@nuxt/cli' + suffix).run()
|
||||||
|
.catch((error) => {
|
||||||
|
require('consola').fatal(error)
|
||||||
|
process.exit(2)
|
||||||
|
})
|
||||||
|
@ -2,3 +2,7 @@
|
|||||||
|
|
||||||
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
const suffix = require('../package.json').name.includes('-edge') ? '-edge' : ''
|
||||||
require('@nuxt/cli' + suffix).run()
|
require('@nuxt/cli' + suffix).run()
|
||||||
|
.catch((error) => {
|
||||||
|
require('consola').fatal(error)
|
||||||
|
process.exit(2)
|
||||||
|
})
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
require('../dist/cli.js').run()
|
require('../dist/cli.js').run()
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
require('consola').fatal(error)
|
require('consola').fatal(error)
|
||||||
process.exit(1)
|
process.exit(2)
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user