mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Improve resilience of installation check
This commit is contained in:
parent
5cd787bf85
commit
f28e79ef4f
@ -3,6 +3,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
try {
|
||||
const { useGlobalLibvips, globalLibvipsVersion, log, spawnRebuild } = require('../lib/libvips');
|
||||
|
||||
const buildFromSource = (msg) => {
|
||||
@ -34,3 +35,7 @@ if (useGlobalLibvips()) {
|
||||
} else if (process.env.npm_config_build_from_source) {
|
||||
buildFromSource('Detected --build-from-source flag');
|
||||
}
|
||||
} catch (err) {
|
||||
const summary = err.message.split(/\n/).slice(0, 1);
|
||||
console.log(`sharp: skipping install check: ${summary}`);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user