Skip to content

Commit 6cc1783

Browse files
committed
fix: tools tip
1 parent 979cb2f commit 6cc1783

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/init.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,12 @@ const init = async (options?: Options) => {
8282
}
8383
])
8484
tools = response.tools
85+
if (tools.length === 0) {
86+
logRed('You must select at least one build tool')
87+
return
88+
}
8589
}
86-
if (tools.length === 0) {
87-
logRed('You must select at least one build tool')
88-
return
89-
}
90+
9091
logGreen(`${template} is creating...`)
9192
Shell.cp('-r', `${join(__dirname, `../${ssrVersion === 'v7' ? 'ssr_v7_example' : 'ssr_v6_example'}/${template}`)}`, `${join(cwd, `./${targetDir}`)}`)
9293
Shell.cp('-r', `${join(__dirname, '../gitignore.tpl')}`, `${join(cwd, `./${targetDir}/.gitignore`)}`)

0 commit comments

Comments
 (0)