From 51d0f7eac97d6e536c9b5b24719ecba8f4b0f792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Fri, 21 Jun 2019 14:40:14 +0200 Subject: [PATCH] Adds more information when the binary is wrong --- scripts/warn-about-yarn1.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/warn-about-yarn1.js b/scripts/warn-about-yarn1.js index 6e958c1a572..d0dc856e9fc 100755 --- a/scripts/warn-about-yarn1.js +++ b/scripts/warn-about-yarn1.js @@ -1,5 +1,10 @@ #!/usr/bin/env node -console.log("Your global Yarn binary isn't recent enough; please upgrade to 1.17.2 or higher."); +const {execSync} = require(`child_process`); + +console.log(`Your global Yarn binary isn't recent enough; please upgrade to 1.17.2 or higher.`); +console.log(``); +console.log(`Binary: ${execSync(`which yarn`).toString().trim()}`); +console.log(`Version: ${execSync(`yarn --version`).toString().trim()}`); process.exitCode = 1;