Skip to content

Commit 953dde3

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
Fix script to pass only non included options
This should be more correct than deleting the object above as under some cases yargs will include the aliases https://github.com/yargs/yargs-parser?tab=readme-ov-file#strip-aliased Bug: none Change-Id: I8daa2a77e4b103c516a06aaf47cdded1bf3ca605 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6387922 Reviewed-by: Liviu Rau <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]>
1 parent 2467bf8 commit 953dde3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/run_on_target.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ const argv = yargs(process.argv.slice(2))
1717

1818
const target = argv.target;
1919
let script = argv.script;
20-
21-
delete argv.target;
22-
delete argv.script;
23-
2420
let sourceRoot = path.dirname(path.dirname(path.resolve(argv['$0'])));
2521

2622
// Ensure that we can find the node_modules folder even if the out folder is
@@ -79,7 +75,7 @@ if (!fs.existsSync(scriptPath)) {
7975
const { argv0 } = process;
8076
const { status } = childProcess.spawnSync(
8177
argv0,
82-
[scriptPath, ...unparse(argv)],
78+
[scriptPath, ...unparse({ _: argv._ })],
8379
{ stdio: 'inherit', env },
8480
);
8581
process.exit(status);

0 commit comments

Comments
 (0)