Ensure SHARP_FORCE_GLOBAL_LIBVIPS option works correctly #4111

Allows the install/check script to inject a logger function,
keeping its use within binding.gyp free of additional output.

Co-authored-by: Lovell Fuller <github@lovell.info>
This commit is contained in:
Richard Hillmann
2024-05-22 11:09:46 +02:00
committed by Lovell Fuller
parent cc96c21e42
commit 56fae3eda1
5 changed files with 27 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ try {
}
};
if (useGlobalLibvips()) {
if (useGlobalLibvips(log)) {
buildFromSource(`Detected globally-installed libvips v${globalLibvipsVersion()}`);
} else if (process.env.npm_config_build_from_source) {
buildFromSource('Detected --build-from-source flag');