File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ function TunnelBinary(httpTunnelConfig, options) {
8989 try {
9090 console . log ( `Downloading latest binary` ) ;
9191 // make Dir if not there.
92- if ( this . checkPath_ ( destParentDir ) ) {
93- this . rmDir ( destParentDir ) ;
92+ if ( ! this . checkPath_ ( destParentDir ) ) {
93+ fs . mkdirSync ( destParentDir , { recursive : true } ) ;
9494 }
95- fs . mkdirSync ( destParentDir , { recursive : true } ) ;
95+
9696 // Generate binary path.
9797 var binaryPath = path . join ( destParentDir , this . binaryName ) ;
9898 var fileStream = fs . createWriteStream ( binaryPath ) ;
@@ -140,7 +140,7 @@ function TunnelBinary(httpTunnelConfig, options) {
140140 console . log ( `Extracting binary` ) ;
141141 try {
142142 var zip = new AdmZip ( binaryPath ) ;
143- zip . extractAllTo ( destParentDir , true ) ;
143+ zip . extractAllTo ( destParentDir , false ) ;
144144 fs . chmod ( destBinaryPath , '0755' , function ( ) {
145145 return fnCallback ( destBinaryPath )
146146 } ) ;
You can’t perform that action at this time.
0 commit comments