Spawn unzip command directly

adm-zip does not support retaining the executable flag and node-unzip
fails for files the size of atom-shell.zip
This commit is contained in:
Kevin Sawicki
2013-09-09 18:24:10 +01:00
parent a669950239
commit e10f06e48f
2 changed files with 3 additions and 9 deletions

View File

@@ -1,7 +1,6 @@
fs = require 'fs'
path = require 'path'
AdmZip = require 'adm-zip'
request = require 'request'
module.exports = (grunt) ->
@@ -44,14 +43,10 @@ module.exports = (grunt) ->
grunt.log.writeln('Unzipping atom-shell')
directoryPath = path.dirname(zipPath)
try
zip = new AdmZip(zipPath)
zip.extractAllTo(directoryPath, true)
spawn {cmd: 'unzip', args: [zipPath, '-d', directoryPath]}, (error) ->
rm(zipPath)
callback()
catch error
callback(error)
rebuildNativeModules = (previousVersion, callback) ->
newVersion = getAtomShellVersion()
if newVersion and newVersion isnt previousVersion