Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let pathTo7zip
if (is.development) {
pathTo7zip = sevenBin.path7za
} else {
const binName = platform({
macos: '7za',
linux: '7za',
windows: '7za.exe',
})
pathTo7zip = getAppResourcesPath('7zip-bin', binName)
}
const seven = extractFull(path, destinationPath, {
$bin: pathTo7zip,
recursive: true,
})
seven.on('end', () => {
def.resolve()
})
seven.on('error', (err) => {
def.reject(err)
})
return def.promise
}