Enable to use http proxy when updating atom-shell.

Used for 🐢 networking :/
This commit is contained in:
Cheng Zhao
2013-09-17 10:05:26 +08:00
parent 1054f1be16
commit e955a0d282

View File

@@ -19,9 +19,11 @@ module.exports = (grunt) ->
grunt.file.isFile(getCachePath(version), 'version')
downloadAtomShell = (version, callback) ->
downloadUrl = "https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/#{version}/atom-shell-#{version}-darwin.zip"
options =
url: "https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/#{version}/atom-shell-#{version}-darwin.zip"
proxy: process.env.http_proxy || process.env.https_proxy
inputStream = request(downloadUrl)
inputStream = request(options)
inputStream.on 'response', (response) ->
if response.statusCode is 200
grunt.log.writeln("Downloading atom-shell version #{version.cyan}")