mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user