From ef3a79bdfe6951cdb796b75580b5a72f7f8ced5b Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau Date: Mon, 7 Sep 2020 08:49:40 +0200 Subject: [PATCH] fix: don't try to install yarn 2 from npm (#7183) as yarn 2 is local in the project and should be started by yarn 1 via yarn config file. When using yarn2, installing latest yarn (v1) should work best Co-authored-by: Michael Kriese --- lib/manager/npm/post-update/yarn.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/manager/npm/post-update/yarn.ts b/lib/manager/npm/post-update/yarn.ts index 53e243f634..667ca710e6 100644 --- a/lib/manager/npm/post-update/yarn.ts +++ b/lib/manager/npm/post-update/yarn.ts @@ -53,7 +53,7 @@ export async function generateLockFile( !isValidYarnRange || minVersion(yarnCompatibility).major === 1; let installYarn = 'npm i -g yarn'; - if (isValidYarnRange) { + if (isYarn1 && isValidYarnRange) { installYarn += `@${quote(yarnCompatibility)}`; }