We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67db6a1 commit 0736ae3Copy full SHA for 0736ae3
.bin/create-rust-webpack.js
@@ -32,10 +32,18 @@ if (!isPresent("git --version")) {
32
process.exit(1);
33
}
34
35
+const args = process.argv.slice(2);
36
+
37
+if (args.some(arg => arg.includes('-'))) {
38
+ console.log(`Error: unknown option ${args.filter(arg => arg.includes('-'))}`);
39
+ process.exit(1);
40
+}
41
42
let folderName = '.';
43
-if (process.argv.length >= 3) {
- folderName = process.argv[2];
44
+if (args.length >= 1) {
45
+ folderName = args[0];
46
47
if (!fs.existsSync(folderName)) {
48
fs.mkdirSync(folderName);
49
0 commit comments