mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Improve install when global libvips below min version #1148
This commit is contained in:
parent
f60f7dab12
commit
48c5f86adb
@ -6,6 +6,9 @@ Requires libvips v8.6.1.
|
|||||||
|
|
||||||
#### v0.20.1 - TBD
|
#### v0.20.1 - TBD
|
||||||
|
|
||||||
|
* Improve installation experience when a globally-installed libvips below the minimum required version is found.
|
||||||
|
[#1148](https://github.com/lovell/sharp/issues/1148)
|
||||||
|
|
||||||
* Prevent smartcrop error when cumulative rounding is below target size.
|
* Prevent smartcrop error when cumulative rounding is below target size.
|
||||||
[#1154](https://github.com/lovell/sharp/issues/1154)
|
[#1154](https://github.com/lovell/sharp/issues/1154)
|
||||||
[@ralrom](https://github.com/ralrom)
|
[@ralrom](https://github.com/ralrom)
|
||||||
|
@ -18,8 +18,9 @@ const minimumLibvipsVersion = libvips.minimumLibvipsVersion;
|
|||||||
const distBaseUrl = process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersion}/`;
|
const distBaseUrl = process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersion}/`;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const useGlobalLibvips = libvips.useGlobalLibvips();
|
||||||
|
if (useGlobalLibvips) {
|
||||||
const globalLibvipsVersion = libvips.globalLibvipsVersion();
|
const globalLibvipsVersion = libvips.globalLibvipsVersion();
|
||||||
if (globalLibvipsVersion) {
|
|
||||||
npmLog.info('sharp', `Detected globally-installed libvips v${globalLibvipsVersion}`);
|
npmLog.info('sharp', `Detected globally-installed libvips v${globalLibvipsVersion}`);
|
||||||
npmLog.info('sharp', 'Building from source via node-gyp');
|
npmLog.info('sharp', 'Building from source via node-gyp');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user