From 00d94046fe717660f2f4ebd79df1f38646ee82bf Mon Sep 17 00:00:00 2001 From: Johannes Herchen <34076797+jherchen@users.noreply.github.com> Date: Mon, 8 Nov 2021 09:50:56 +0100 Subject: [PATCH] fix preinstall script (#136638) detect yarn with .cjs extensions --- build/npm/preinstall.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/npm/preinstall.js b/build/npm/preinstall.js index 6319e5d1279..34618a58b68 100644 --- a/build/npm/preinstall.js +++ b/build/npm/preinstall.js @@ -23,7 +23,7 @@ if (majorYarnVersion < 1 || minorYarnVersion < 10) { err = true; } -if (!/yarn[\w-.]*\.js$|yarnpkg$/.test(process.env['npm_execpath'])) { +if (!/yarn[\w-.]*\.c?js$|yarnpkg$/.test(process.env['npm_execpath'])) { console.error('\033[1;31m*** Please use yarn to install dependencies.\033[0;0m'); err = true; }