Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
}
if (args.help) {
await printUsageAndExit(false)
} else if (args.version) {
if (typeof args.version !== 'boolean') {
console.error('--version does not take an argument. Perhaps you meant --app-version or --electron-version?\n')
}
console.log(hostInfo())
process.exit(0)
} else if (!args.dir) {
await printUsageAndExit(true)
}
initializeProxy()
try {
const appPaths = await packager(args)
if (appPaths.length > 1) {
console.error(`Wrote new apps to:\n${appPaths.join('\n')}`)
} else if (appPaths.length === 1) {
console.error('Wrote new app to', appPaths[0])
}
} catch (err) {
if (err.message) {
console.error(err.message)
} else {
console.error(err, err.stack)
}
process.exit(1)
}