Allow libvips binary location override with version appended (#2217)

This commit is contained in:
malice00 2020-05-22 17:07:32 +02:00 committed by GitHub
parent 507eef3053
commit d248eadb06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,8 @@ const minimumGlibcVersionByArch = {
}; };
const { minimumLibvipsVersion, minimumLibvipsVersionLabelled } = libvips; const { minimumLibvipsVersion, minimumLibvipsVersionLabelled } = libvips;
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersionLabelled}/`; const distHost = process.env.npm_config_sharp_libvips_binary_host || process.env.npm_config_sharp_libvips_binary_host_mirror || 'https://github.com/lovell/sharp-libvips/releases/download/';
const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || distHost + `/v${minimumLibvipsVersionLabelled}/`;
const fail = function (err) { const fail = function (err) {
npmLog.error('sharp', err.message); npmLog.error('sharp', err.message);