Skip to content

Commit 79ace5c

Browse files
authored
fix(cli): fix cap run command for yarn pnp mode (#7754)
Co-authored-by: shaoyu <shaoyu>
1 parent abcbafa commit 79ace5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cli/src/util/native-run.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ export async function runNativeRun(args: readonly string[], options: RunCommandO
1616
fatal(`${c.input('native-run')} not found.`);
1717
}
1818

19-
return await runCommand(p, args, options);
19+
if (process.versions.pnp) {
20+
return await runCommand('yarn', ['node', p, ...args], options);
21+
} else {
22+
return await runCommand(p, args, options);
23+
}
2024
}
2125

2226
export async function getPlatformTargets(platformName: string): Promise<PlatformTarget[]> {

0 commit comments

Comments
 (0)