Skip to content

Commit

Permalink
Support Yarn 2+
Browse files Browse the repository at this point in the history
  • Loading branch information
lydell committed Jan 4, 2023
1 parent 05ddefd commit bf16d39
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion installers/npm/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ module.exports = function()
}
}

// Yarn 2 and later ("Berry") always invokes `node` (regardless of configuration)
// so we cannot do any optimizations there
var isYarnBerry = /\byarn\/(?!1\.)/.test(process.env.npm_config_user_agent || "");

// as mentioned in bin/elm we cannot do any optimizations on Windows
if (process.platform === 'win32')
if (process.platform === 'win32' || isYarnBerry)
{
return subBinaryPath;
}
Expand Down

0 comments on commit bf16d39

Please sign in to comment.