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 11var 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 ( / 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' ;
1413 } 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) ) {
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
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments