mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +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)
|
||||
}
|
||||
|
||||
const t = await downloadTemplate(template, {
|
||||
dir: args._[0] as string,
|
||||
force: args.force,
|
||||
offline: args.offline,
|
||||
preferOffline: args['prefer-offline'],
|
||||
registry: process.env.NUXI_INIT_REGISTRY || DEFAULT_REGISTRY
|
||||
})
|
||||
let t
|
||||
|
||||
try {
|
||||
t = await downloadTemplate(template, {
|
||||
dir: args._[0] as string,
|
||||
force: args.force,
|
||||
offline: args.offline,
|
||||
preferOffline: args['prefer-offline'],
|
||||
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
|
||||
const relativeDist = rpath(t.dir)
|
||||
|
Loading…
Reference in New Issue
Block a user