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

Commit 08eee40

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

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.bin/create-rust-webpack.js

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

35+
const args = process.argv.slice(2);
36+
37+
if (args.some(arg => arg.includes('-'))) {
38+
console.log(`Error: unknown option ${args[0]}`);
39+
process.exit(1);
40+
}
41+
3542
let folderName = '.';
43+
folderName = args[2];
3644

37-
if (process.argv.length >= 3) {
38-
folderName = process.argv[2];
39-
if (!fs.existsSync(folderName)) {
40-
fs.mkdirSync(folderName);
41-
}
45+
if (!fs.existsSync(folderName)) {
46+
fs.mkdirSync(folderName);
4247
}
4348

4449
let gitFolder = path.join(folderName, "git-clone");

0 commit comments

Comments
 (0)