Ignore global libvips during install via SHARP_IGNORE_GLOBAL_LIBVIPS (#1165)

This commit is contained in:
Thomas Parisot
2018-03-22 18:48:30 +00:00
committed by Lovell Fuller
parent 8dac256096
commit 0d7c3fc4d8
3 changed files with 24 additions and 5 deletions

View File

@@ -58,5 +58,13 @@ describe('libvips binaries', function () {
const hasVendoredLibvips = libvips.hasVendoredLibvips();
assert.strictEqual('boolean', typeof hasVendoredLibvips);
});
it('useGlobalLibvips can be ignored via an env var', function () {
process.env.SHARP_IGNORE_GLOBAL_LIBVIPS = 1;
const useGlobalLibvips = libvips.useGlobalLibvips();
assert.strictEqual(false, useGlobalLibvips);
delete process.env.SHARP_IGNORE_GLOBAL_LIBVIPS;
});
});
});