Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
io(input: string, output: string) {
const { quality = 70 } = this.options
const mozjpegBinFixed = mozjpegBin.replace('app.asar', 'app.asar.unpacked')
return spawn(mozjpegBinFixed, [
'-quality',
quality.toString(),
'-outfile',
output,
input,
], {
capture: [ 'stdout', 'stderr' ],
}).catch(e => {
throw new Error(e.message + '\n' + e.stderr)
})
}
}