mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Improve error message if libvips tarball is corrupt
This commit is contained in:
parent
9cc06c887b
commit
9ee377963e
@ -34,7 +34,12 @@ const extractTarball = function (tarPath) {
|
|||||||
cwd: vendorPath,
|
cwd: vendorPath,
|
||||||
strict: true
|
strict: true
|
||||||
})
|
})
|
||||||
.catch(fail);
|
.catch(function (err) {
|
||||||
|
if (/unexpected end of file/.test(err.message)) {
|
||||||
|
npmLog.error('sharp', `Please delete ${tarPath} as it is not a valid tarball`);
|
||||||
|
}
|
||||||
|
fail(err);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user