mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
fix(nuxi): prevent showing stack traces while scaffolding (#9962)
This commit is contained in:
parent
de50b41e2d
commit
bcc784243e
@ -23,13 +23,23 @@ export default defineNuxtCommand({
|
|||||||
process.exit(1)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const t = await downloadTemplate(template, {
|
let t
|
||||||
|
|
||||||
|
try {
|
||||||
|
t = await downloadTemplate(template, {
|
||||||
dir: args._[0] as string,
|
dir: args._[0] as string,
|
||||||
force: args.force,
|
force: args.force,
|
||||||
offline: args.offline,
|
offline: args.offline,
|
||||||
preferOffline: args['prefer-offline'],
|
preferOffline: args['prefer-offline'],
|
||||||
registry: process.env.NUXI_INIT_REGISTRY || DEFAULT_REGISTRY
|
registry: process.env.NUXI_INIT_REGISTRY || DEFAULT_REGISTRY
|
||||||
})
|
})
|
||||||
|
} catch (err) {
|
||||||
|
if (process.env.DEBUG) {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
consola.error((err as Error).toString())
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
// Show next steps
|
// Show next steps
|
||||||
const relativeDist = rpath(t.dir)
|
const relativeDist = rpath(t.dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user