From da38c620005596d71f3ae22f33fb2653312515d0 Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 4 Jan 2023 23:45:30 +0530 Subject: [PATCH] fix(nuxi): show an error if no value is supplied for the `--template` flag (#9946) --- packages/nuxi/src/commands/init.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nuxi/src/commands/init.ts b/packages/nuxi/src/commands/init.ts index fee448cfea..79e9ce8274 100644 --- a/packages/nuxi/src/commands/init.ts +++ b/packages/nuxi/src/commands/init.ts @@ -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,