Skip to content

Commit

Permalink
Fixes Node forwarding w/ yarn-path (#7592)
Browse files Browse the repository at this point in the history
* Fixes Node forwarding w/ yarn-path

* Fixes spawning
  • Loading branch information
arcanis committed Oct 2, 2019
1 parent 25d5526 commit 5119828
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cli/index.js
Expand Up @@ -617,7 +617,11 @@ async function start(): Promise<void> {
let exitCode = 0;

try {
exitCode = await spawnp(yarnPath, argv, opts);
if (yarnPath.endsWith(`.js`)) {
exitCode = await spawnp(process.execPath, [yarnPath, ...argv], opts);
} else {
exitCode = await spawnp(yarnPath, argv, opts);
}
} catch (firstError) {
try {
exitCode = await forkp(yarnPath, argv, opts);
Expand Down

0 comments on commit 5119828

Please sign in to comment.