Skip to content

Commit 4ce48ce

Browse files
committed
Fixes Node forwarding w/ yarn-path (#7592)
* Fixes Node forwarding w/ yarn-path * Fixes spawning
1 parent 52986be commit 4ce48ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cli/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,11 @@ async function start(): Promise<void> {
617617
let exitCode = 0;
618618

619619
try {
620-
exitCode = await spawnp(yarnPath, argv, opts);
620+
if (yarnPath.endsWith(`.js`)) {
621+
exitCode = await spawnp(process.execPath, [yarnPath, ...argv], opts);
622+
} else {
623+
exitCode = await spawnp(yarnPath, argv, opts);
624+
}
621625
} catch (firstError) {
622626
try {
623627
exitCode = await forkp(yarnPath, argv, opts);

0 commit comments

Comments
 (0)