fix(nuxi): show an error if no value is supplied for the --template flag (#9946)

This commit is contained in:
James George 2023-01-04 23:45:30 +05:30 committed by GitHub
parent b7d0f52de6
commit da38c62000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,11 @@ export default defineNuxtCommand({
// Clone template
const template = args.template || args.t || 'v3'
if (typeof template === 'boolean') {
consola.error('Please specify a template!')
process.exit(1)
}
const t = await downloadTemplate(template, {
dir: args._[0] as string,
force: args.force,