File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
var https = require ( 'https' ) ,
2
- unzip = require ( 'unzip' ) ,
3
2
fs = require ( 'fs' ) ,
4
3
path = require ( 'path' ) ,
5
4
os = require ( 'os' ) ,
@@ -10,7 +9,7 @@ function LocalBinary(){
10
9
this . is64bits = process . arch == 'x64' ;
11
10
12
11
if ( this . hostOS . match ( / d a r w i n | m a c o s / 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' ;
14
13
} else if ( this . hostOS . match ( / m s w i n | m s y s | m i n g w | c y g w i n | b c c w i n | w i n c e | e m c / i) ) {
15
14
this . windows = true ;
16
15
this . httpPath = 'https://s3.amazonaws.com/browserStack/browserstack-local/BrowserStackLocal.exe' ;
@@ -32,16 +31,15 @@ function LocalBinary(){
32
31
fs . mkdirSync ( path ) ;
33
32
34
33
var binaryPath = destParentDir + './BrowserStackLocal' ;
35
- var extractStream = unzip . Extract ( {
36
- path : destParentDir
37
- } ) ;
34
+ var file = fs . createWriteStream ( binaryPath ) ;
35
+
38
36
https . get ( this . http_path , function ( response ) {
39
- extractStream . on ( 'close ' , function ( ) {
37
+ response . on ( 'end ' , function ( ) {
40
38
fs . chmod ( binaryPath , '0755' , function ( ) {
41
39
callback ( binaryPath ) ;
42
40
} ) ;
43
41
} ) ;
44
- response . pipe ( extractStream ) ;
42
+ response . pipe ( file ) ;
45
43
} ) ;
46
44
} ;
47
45
Original file line number Diff line number Diff line change 15
15
"author" : " BrowserStack" ,
16
16
"license" : " MIT" ,
17
17
"dependencies" : {
18
- "is-running" : " ^2.0.0" ,
19
- "unzip" : " 0.1.11"
18
+ "is-running" : " ^2.0.0"
20
19
},
21
20
"devDependencies" : {
22
21
"eslint" : " 1.10.3" ,
You can’t perform that action at this time.
0 commit comments