From 5b73ef20eb7cd0b5f8dfb604b56b1566b09f26a3 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 5 Sep 2013 11:21:28 -0700 Subject: [PATCH] Catch any errors thrown by adm-zip --- tasks/update-atom-shell-task.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tasks/update-atom-shell-task.coffee b/tasks/update-atom-shell-task.coffee index 23dca81b7..fa16544f0 100644 --- a/tasks/update-atom-shell-task.coffee +++ b/tasks/update-atom-shell-task.coffee @@ -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()