Catch any errors thrown by adm-zip

This commit is contained in:
Kevin Sawicki
2013-09-05 11:21:28 -07:00
parent 0e3caafe4d
commit 5b73ef20eb

View File

@@ -45,9 +45,12 @@ module.exports = (grunt) ->
inputStream.on 'close', -> callback()
inputStream.on 'error', -> callback(new Error("Unzipping #{zipPath} failed"))
zip = new AdmZip(zipPath);
zip.extractAllTo(directoryPath, true)
rm(zipPath, force: true)
try
zip = new AdmZip(zipPath);
zip.extractAllTo(directoryPath, true)
rm(zipPath, force: true)
catch error
callback(error)
rebuildNativeModules = (previousVersion, callback) ->
newVersion = getAtomShellVersion()