Skip to content

Commit 709fc9b

Browse files
committed
remove zip handling
1 parent f5928df commit 709fc9b

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

lib/LocalBinary.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var https = require('https'),
2-
unzip = require('unzip'),
32
fs = require('fs'),
43
path = require('path'),
54
os = require('os'),
@@ -10,7 +9,7 @@ function LocalBinary(){
109
this.is64bits = process.arch == 'x64';
1110

1211
if(this.hostOS.match(/darwin|mac os/i)){
13-
this.httpPath = 'https://www.browserstack.com/browserstack-local/BrowserStackLocal-darwin-x64.zip';
12+
this.httpPath = 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal-darwin-x64';
1413
} else if(this.hostOS.match(/mswin|msys|mingw|cygwin|bccwin|wince|emc/i)) {
1514
this.windows = true;
1615
this.httpPath = 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal.exe';
@@ -32,16 +31,15 @@ function LocalBinary(){
3231
fs.mkdirSync(path);
3332

3433
var binaryPath = destParentDir + './BrowserStackLocal';
35-
var extractStream = unzip.Extract({
36-
path: destParentDir
37-
});
34+
var file = fs.createWriteStream(binaryPath);
35+
3836
https.get(this.http_path, function (response) {
39-
extractStream.on('close', function () {
37+
response.on('end', function () {
4038
fs.chmod(binaryPath, '0755', function() {
4139
callback(binaryPath);
4240
});
4341
});
44-
response.pipe(extractStream);
42+
response.pipe(file);
4543
});
4644
};
4745

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
"author": "BrowserStack",
1616
"license": "MIT",
1717
"dependencies": {
18-
"is-running": "^2.0.0",
19-
"unzip": "0.1.11"
18+
"is-running": "^2.0.0"
2019
},
2120
"devDependencies": {
2221
"eslint": "1.10.3",

0 commit comments

Comments
 (0)