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 authored and arcanis committed Aug 27, 2020
1 parent 8c1e278 commit cf4e1d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/index.js
Original file line number Diff line number Diff line change
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 cf4e1d3

Please sign in to comment.