Skip to content

Commit

Permalink
install: prevent usage of global libvips
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Nov 23, 2023
1 parent b04aa75 commit 7875c51
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrypted",
"version": "1.3.3",
"version": "1.3.4",
"description": "",
"main": "./dist/packages/cli/src/main.js",
"bin": {
Expand Down
6 changes: 5 additions & 1 deletion packages/cli/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ async function runCommand(command: string, ...args: string[]) {
command += '.cmd';
console.log('running', command, ...args);
const cp = child_process.spawn(command, args, {
stdio: 'inherit'
stdio: 'inherit',
env: {
// https://github.com/lovell/sharp/blob/eefaa998725cf345227d94b40615e090495c6d09/lib/libvips.js#L115C19-L115C46
SHARP_IGNORE_GLOBAL_LIBVIPS: 'true',
},
});
await once(cp, 'exit');
if (cp.exitCode)
Expand Down

0 comments on commit 7875c51

Please sign in to comment.