Skip to content

Commit

Permalink
Add expected min libvips version to error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Dec 7, 2017
1 parent 053e727 commit 47237b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ module.exports.download_vips = function () {
// Ensure Intel 64-bit or ARM
const arch = process.env.npm_config_arch || process.arch;
if (arch === 'ia32') {
error('Intel Architecture 32-bit systems require manual installation of libvips - please see http://sharp.dimens.io/page/install');
error(`Intel Architecture 32-bit systems require manual installation of libvips >= ${minimumLibvipsVersion} - please see http://sharp.dimens.io/page/install`);
}
// Ensure glibc Linux
if (detectLibc.isNonGlibcLinux) {
error(`Use with ${detectLibc.family} libc requires manual installation of libvips - please see http://sharp.dimens.io/page/install`);
error(`Use with ${detectLibc.family} libc requires manual installation of libvips >= ${minimumLibvipsVersion} - please see http://sharp.dimens.io/page/install`);
}
// Ensure glibc >= 2.13
if (detectLibc.family === detectLibc.GLIBC && detectLibc.version && semver.lt(`${detectLibc.version}.0`, '2.13.0')) {
error(`Use with glibc version ${detectLibc.version} requires manual installation of libvips - please see http://sharp.dimens.io/page/install`);
error(`Use with glibc version ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion} - please see http://sharp.dimens.io/page/install`);
}
// Arch/platform-specific .tar.gz
const tarFilename = ['libvips', minimumLibvipsVersion, currentPlatformId].join('-') + '.tar.gz';
Expand Down

0 comments on commit 47237b1

Please sign in to comment.