Install: include platformAndArch in help after failure

This commit is contained in:
Lovell Fuller 2021-12-12 21:12:47 +00:00
parent 2b8e4d20de
commit 96992845ed

View File

@ -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(