Skip to content

Commit

Permalink
Spawn yarn .cjs files also using process.execPath (#8144)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgotink committed May 25, 2020
1 parent fc8489a commit 4df89bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/index.js
Expand Up @@ -635,7 +635,7 @@ async function start(): Promise<void> {
});

try {
if (yarnPath.endsWith(`.js`)) {
if (/\.[cm]?js$/.test(yarnPath)) {
exitCode = await spawnp(process.execPath, [yarnPath, ...argv], opts);
} else {
exitCode = await spawnp(yarnPath, argv, opts);
Expand Down

0 comments on commit 4df89bc

Please sign in to comment.