Skip to content

Commit

Permalink
Allow cross platform installation by disable libc check flag
Browse files Browse the repository at this point in the history
  • Loading branch information
xemle committed May 4, 2021
1 parent 070534d commit 3f2e222
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ try {
if (platformAndArch === 'freebsd-x64' || platformAndArch === 'openbsd-x64' || platformAndArch === 'sunos-x64') {
throw new Error(`BSD/SunOS systems require manual installation of libvips >= ${minimumLibvipsVersion}`);
}
if (detectLibc.family === detectLibc.GLIBC && detectLibc.version) {
if (detectLibc.family === detectLibc.GLIBC && detectLibc.version && !process.env.npm_config_sharp_disable_libc_check) {
if (semverLessThan(`${detectLibc.version}.0`, `${minimumGlibcVersionByArch[arch]}.0`)) {
throw new Error(`Use with glibc ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`);
}
}
if (detectLibc.family === detectLibc.MUSL && detectLibc.version) {
if (detectLibc.family === detectLibc.MUSL && detectLibc.version && !process.env.npm_config_sharp_disable_libc_check) {
if (semverLessThan(detectLibc.version, '1.1.24')) {
throw new Error(`Use with musl ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`);
}
Expand Down

0 comments on commit 3f2e222

Please sign in to comment.