mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Install: log possible error when removing vendor dir
This commit is contained in:
parent
391018ad3d
commit
d08baa20e6
@ -77,7 +77,11 @@ const verifyIntegrity = function (platformAndArch) {
|
||||
flush: function (done) {
|
||||
const digest = `sha512-${hash.digest('base64')}`;
|
||||
if (expected !== digest) {
|
||||
libvips.removeVendoredLibvips();
|
||||
try {
|
||||
libvips.removeVendoredLibvips();
|
||||
} catch (err) {
|
||||
libvips.log(err.message);
|
||||
}
|
||||
libvips.log(`Integrity expected: ${expected}`);
|
||||
libvips.log(`Integrity received: ${digest}`);
|
||||
done(new Error(`Integrity check failed for ${platformAndArch}`));
|
||||
|
@ -88,8 +88,7 @@ const hasVendoredLibvips = function () {
|
||||
|
||||
/* istanbul ignore next */
|
||||
const removeVendoredLibvips = function () {
|
||||
const rm = fs.rmSync ? fs.rmSync : fs.rmdirSync;
|
||||
rm(vendorPath, { recursive: true, maxRetries: 3, force: true });
|
||||
fs.rmSync(vendorPath, { recursive: true, maxRetries: 3, force: true });
|
||||
};
|
||||
|
||||
/* istanbul ignore next */
|
||||
|
Loading…
x
Reference in New Issue
Block a user