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)
|
process.exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
const t = await downloadTemplate(template, {
|
let t
|
||||||
dir: args._[0] as string,
|
|
||||||
force: args.force,
|
try {
|
||||||
offline: args.offline,
|
t = await downloadTemplate(template, {
|
||||||
preferOffline: args['prefer-offline'],
|
dir: args._[0] as string,
|
||||||
registry: process.env.NUXI_INIT_REGISTRY || DEFAULT_REGISTRY
|
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
|
// Show next steps
|
||||||
const relativeDist = rpath(t.dir)
|
const relativeDist = rpath(t.dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user