Skip to content
This repository was archived by the owner on Aug 25, 2025. It is now read-only.

Commit e4ae3b7

Browse files
fix: tweak
closes #156
1 parent 67db6a1 commit e4ae3b7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.bin/create-rust-webpack.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,16 @@ if (!isPresent("git --version")) {
3232
process.exit(1);
3333
}
3434

35-
let folderName = '.';
35+
const args = process.argv.slice(2);
3636

37-
if (process.argv.length >= 3) {
38-
folderName = process.argv[2];
37+
if (args.some(arg => arg.includes('-'))) {
38+
console.log(`Error: unknown option ${args[0]}`);
39+
process.exit(1);
40+
}
41+
42+
let folderName = '.';
43+
if (args.length >= 1) {
44+
folderName = args[2];
3945
if (!fs.existsSync(folderName)) {
4046
fs.mkdirSync(folderName);
4147
}

0 commit comments

Comments
 (0)