Skip to content

Commit 3d64087

Browse files
committed
fix: passing argv to Rsbuild CLI
1 parent 098d6a3 commit 3d64087

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cli/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Options:
2222
-v, --version Display version number`;
2323

2424
async function runRsbuildCLI(args: string[]): Promise<void> {
25-
process.argv = [
25+
const argv = [
2626
process.execPath,
2727
'rsbuild',
2828
...args,
@@ -31,7 +31,7 @@ async function runRsbuildCLI(args: string[]): Promise<void> {
3131
];
3232

3333
const { runCLI } = await import('@rsbuild/core');
34-
runCLI();
34+
runCLI({ argv });
3535
}
3636

3737
async function runRstestCLI(args: string[]): Promise<void> {

0 commit comments

Comments
 (0)