diff --git a/lib/libvips.js b/lib/libvips.js index cf2cc3ee7..2b0f9edfc 100644 --- a/lib/libvips.js +++ b/lib/libvips.js @@ -162,21 +162,23 @@ const pkgConfigPath = () => { } }; -const skipSearch = (status, reason) => { - log(`Detected ${reason}, skipping search for globally-installed libvips`); +const skipSearch = (status, reason, quiet) => { + if (!quiet) { + log(`Detected ${reason}, skipping search for globally-installed libvips`); + } return status; }; -const useGlobalLibvips = () => { +const useGlobalLibvips = (quiet = false) => { if (Boolean(process.env.SHARP_IGNORE_GLOBAL_LIBVIPS) === true) { - return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS'); + return skipSearch(false, 'SHARP_IGNORE_GLOBAL_LIBVIPS', quiet); } if (Boolean(process.env.SHARP_FORCE_GLOBAL_LIBVIPS) === true) { - return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS'); + return skipSearch(true, 'SHARP_FORCE_GLOBAL_LIBVIPS', quiet); } /* istanbul ignore next */ if (isRosetta()) { - return skipSearch(false, 'Rosetta'); + return skipSearch(false, 'Rosetta', quiet); } const globalVipsVersion = globalLibvipsVersion(); return !!globalVipsVersion && /* istanbul ignore next */ diff --git a/src/binding.gyp b/src/binding.gyp index f1fc60910..359d58aee 100644 --- a/src/binding.gyp +++ b/src/binding.gyp @@ -89,7 +89,7 @@ 'conditions': [ ['OS != "win"', { 'pkg_config_path': '