Skip to content

Commit 2169138

Browse files
committed
fix(log): return won't work anymore with ES module use exit
1 parent 1347454 commit 2169138

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ import customize from './customize.js'
99
const args = process.argv
1010

1111
if (args.length < 3) {
12-
return console.error('Please provide a name for your plugin.')
12+
console.error('Please provide a name for your plugin.')
13+
process.exit()
1314
}
1415

1516
const name = names(args[2])
1617

1718
if (existsSync(name.regular)) {
18-
return console.warn(
19+
console.warn(
1920
`A folder or file named ${name.regular} already exists in ${process.cwd()}.`
2021
)
22+
process.exit()
2123
}
2224

2325
if (existsSync(name.regular)) {

0 commit comments

Comments
 (0)