mirror of
https://github.com/lovell/sharp.git
synced 2025-07-13 04:20:12 +02:00
Throw error rather than exit for invalid binaries #2931
This commit is contained in:
parent
b9f211fe34
commit
648a1e05da
@ -18,6 +18,9 @@ Requires libvips v8.11.3
|
||||
[#2918](https://github.com/lovell/sharp/pull/2918)
|
||||
[@dkrnl](https://github.com/dkrnl)
|
||||
|
||||
* Throw error rather than exit when invalid binaries detected.
|
||||
[#2931](https://github.com/lovell/sharp/issues/2931)
|
||||
|
||||
### v0.29.1 - 7th September 2021
|
||||
|
||||
* Add `lightness` option to `modulate` operation.
|
||||
|
@ -24,9 +24,8 @@ try {
|
||||
const loadedModule = Object.keys(require.cache).find((i) => /[\\/]build[\\/]Release[\\/]sharp(.*)\.node$/.test(i));
|
||||
if (loadedModule) {
|
||||
const [, loadedPackage] = loadedModule.match(/node_modules[\\/]([^\\/]+)[\\/]/);
|
||||
help.push(`- Ensure version aligns with: "npm ls sharp". Now sharp already loaded in: "${loadedPackage}"`);
|
||||
help.push(`- Ensure the version of sharp aligns with the ${loadedPackage} package: "npm ls sharp"`);
|
||||
}
|
||||
}
|
||||
console.error(help.join('\n'));
|
||||
process.exit(1);
|
||||
throw new Error(help.join('\n'));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user