mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 02:28:55 +00:00
return when erroring early
This commit is contained in:
parent
d32cf1034f
commit
923996f6ca
4
index.js
4
index.js
@ -21,14 +21,14 @@ module.exports = function packager (opts, cb) {
|
||||
switch (arch) {
|
||||
case 'ia32': break
|
||||
case 'x64': break
|
||||
default: cb(new Error('Unsupported arch'))
|
||||
default: return cb(new Error('Unsupported arch. Must be either ia32 or x64'))
|
||||
}
|
||||
|
||||
switch (platform) {
|
||||
case 'darwin': packager = mac; break
|
||||
case 'linux': packager = linux; break
|
||||
case 'win32': packager = win32; break
|
||||
default: cb(new Error('Unsupported platform'))
|
||||
default: return cb(new Error('Unsupported platform. Must be either darwin, linux, or win32'))
|
||||
}
|
||||
|
||||
download({
|
||||
|
Loading…
Reference in New Issue
Block a user