mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 05:36:18 +01:00
Remove install script, building from source is now opt-in
The vast majority of people don't need this. Package managers are (correctly) starting to block install scripts by default, so this change should reduce install-time warnings.
This commit is contained in:
@@ -10,7 +10,7 @@ const {
|
||||
spawnRebuild,
|
||||
} = require('../lib/libvips');
|
||||
|
||||
log('Attempting to build from source via node-gyp');
|
||||
log('Building from source');
|
||||
log('See https://sharp.pixelplumbing.com/install#building-from-source');
|
||||
|
||||
try {
|
||||
@@ -29,7 +29,7 @@ try {
|
||||
}
|
||||
|
||||
if (useGlobalLibvips(log)) {
|
||||
log(`Detected globally-installed libvips v${globalLibvipsVersion()}`);
|
||||
log(`Found globally-installed libvips v${globalLibvipsVersion()}`);
|
||||
}
|
||||
|
||||
const status = spawnRebuild();
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/*!
|
||||
Copyright 2013 Lovell Fuller and others.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
try {
|
||||
const { useGlobalLibvips } = require('../lib/libvips');
|
||||
if (useGlobalLibvips() || process.env.npm_config_build_from_source) {
|
||||
process.exit(1);
|
||||
}
|
||||
} catch (err) {
|
||||
const summary = err.message.split(/\n/).slice(0, 1);
|
||||
console.log(`sharp: skipping install check: ${summary}`);
|
||||
}
|
||||
Reference in New Issue
Block a user