Skip to content

Commit 194d569

Browse files
authored
fix(cta-js): rename arguments to args due to strict mode (#478)
* rename arguments to args due to strict mode * change file
1 parent 3693c87 commit 194d569

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

.changes/js-strict.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": "patch"
3+
---
4+
5+
Fix running `create-tauri-app` in JS environments in strict mode.

packages/cli/node/create-tauri-app.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
const cli = require("./index");
88
const path = require("path");
99

10-
const [bin, script, ...arguments] = process.argv;
10+
const [bin, script, ...args] = process.argv;
1111
const binStem = path.parse(bin).name.toLowerCase();
1212

1313
// We want to make a helpful binary name for the underlying CLI helper, if we
@@ -46,7 +46,7 @@ if (binStem.match(/(nodejs|node)-*([1-9]*)*$/g)) {
4646
}
4747
} else {
4848
// We don't know what started it, assume it's already stripped.
49-
arguments.unshift(bin);
49+
args.unshift(bin);
5050
}
5151

52-
cli.run(arguments, binName);
52+
cli.run(args, binName);

0 commit comments

Comments
 (0)