Skip prebuilt binaries for musl >=1.2.0 #2570

This commit is contained in:
Lovell Fuller 2021-02-20 19:40:40 +00:00
parent 0c1075c089
commit 9f2f92095d
2 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,7 @@ Ready-compiled sharp and libvips binaries are provided for use with
Node.js v10+ on the most common platforms: Node.js v10+ on the most common platforms:
* macOS x64 (>= 10.13) * macOS x64 (>= 10.13)
* Linux x64 (glibc >= 2.17, musl >= 1.1.24) * Linux x64 (glibc >= 2.17, musl >=1.1.24 <1.2.0)
* Linux ARM64 (glibc >= 2.29) * Linux ARM64 (glibc >= 2.29)
* Windows x64 * Windows x64
* Windows x86 * Windows x86

View File

@ -82,6 +82,11 @@ try {
throw new Error(`Use with glibc ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`); throw new Error(`Use with glibc ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`);
} }
} }
if (detectLibc.family === detectLibc.MUSL && detectLibc.version) {
if (!semver.satisfies(detectLibc.version, '>=1.1.24 <1.2.0')) {
throw new Error(`Use with musl ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`);
}
}
const supportedNodeVersion = process.env.npm_package_engines_node || require('../package.json').engines.node; const supportedNodeVersion = process.env.npm_package_engines_node || require('../package.json').engines.node;
if (!semver.satisfies(process.versions.node, supportedNodeVersion)) { if (!semver.satisfies(process.versions.node, supportedNodeVersion)) {