Skip to content

Commit

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

* Fixes spawning
  • Loading branch information
arcanis authored and Vincent Bailly committed Jun 10, 2020
1 parent d069f16 commit 8575ac6
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 8575ac6

Please sign in to comment.