From 59327bdd53a8e009255b0eec44b66c93aaa62a4a Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 27 Sep 2023 16:20:04 +0100 Subject: [PATCH] Install: libvips check takes precedence over flag --- install/check.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install/check.js b/install/check.js index 7bccd2f0..a398c643 100644 --- a/install/check.js +++ b/install/check.js @@ -12,16 +12,16 @@ const buildFromSource = (msg) => { require('node-gyp'); } catch (err) { log('You might need to install node-gyp'); - log('See https://sharp.pixelplumbing.com/install#building-from-source'); } + log('See https://sharp.pixelplumbing.com/install#building-from-source'); const status = gypRebuild(); if (status !== 0) { process.exit(status); } }; -if (process.env.npm_config_build_from_source) { - buildFromSource('Detected --build-from-source flag'); -} else if (useGlobalLibvips()) { +if (useGlobalLibvips()) { buildFromSource(`Detected globally-installed libvips v${globalLibvipsVersion()}`); +} else if (process.env.npm_config_build_from_source) { + buildFromSource('Detected --build-from-source flag'); }