Skip to content

Commit 477a1b8

Browse files
committed
fix(rstack): pass compatible Rstest CLI args
1 parent 5694d35 commit 477a1b8

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/rstack/src/cli/commands.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,15 @@ async function runRstestCLI(args: string[]): Promise<void> {
6262
const rstestCore = (await import('@rstest/core')) as unknown as {
6363
runCLI?: RunCLI;
6464
};
65-
const runCLI =
66-
rstestCore.runCLI ??
67-
((await import('@rstest/core/api')) as unknown as { runCLI: RunCLI })
68-
.runCLI;
69-
runCLI({ argv });
65+
if (rstestCore.runCLI) {
66+
rstestCore.runCLI({ argv });
67+
return;
68+
}
69+
70+
const { runCLI } = (await import('@rstest/core/api')) as unknown as {
71+
runCLI: RunCLI;
72+
};
73+
runCLI({ argv: argv.slice(2) });
7074
}
7175

7276
async function runRslibCLI(args: string[]): Promise<void> {

0 commit comments

Comments
 (0)