From 96992845ed25b74ab6ee1b82a9a1b443b86f6931 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sun, 12 Dec 2021 21:12:47 +0000 Subject: [PATCH] Install: include platformAndArch in help after failure --- lib/sharp.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/sharp.js b/lib/sharp.js index 3fd03785..4a4dd22c 100644 --- a/lib/sharp.js +++ b/lib/sharp.js @@ -11,9 +11,10 @@ try { if (/dylib/.test(err.message) && /Incompatible library version/.test(err.message)) { help.push('- Update Homebrew: "brew update && brew upgrade vips"'); } else { + const [platform, arch] = platformAndArch.split('-'); help.push( '- Install with the --verbose flag and look for errors: "npm install --ignore-scripts=false --verbose sharp"', - `- Install for the current runtime: "npm install --platform=${process.platform} --arch=${process.arch} sharp"` + `- Install for the current ${platformAndArch} runtime: "npm install --platform=${platform} --arch=${arch} sharp"` ); } help.push(