Skip to content

Commit 96720d7

Browse files
author
kanhaiya
committed
Addded new env for force download binary LT_FORCE_DOWNLOAD
1 parent 5df4ffa commit 96720d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/tunnel_binary.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function TunnelBinary(httpTunnelConfig) {
205205
}
206206
var binaryPath = path.join(destParentDir, destBinaryName);
207207
// Check whether executable binary File is exist or need to Downlaod.
208-
if (this.checkPath_(binaryPath, fs.X_OK)) {
208+
if (this.checkPath_(binaryPath, fs.X_OK) && !process.env.LT_FORCE_DOWNLOAD) {
209209
var that = this;
210210
console.log(`Checking for updates`);
211211
// Comparing with local hash to find out binary changes.
@@ -222,6 +222,7 @@ function TunnelBinary(httpTunnelConfig) {
222222
that.download_(conf, destParentDir, 5, fnCallback);
223223
}
224224
} else {
225+
delete process.env.LT_FORCE_DOWNLOAD;
225226
this.download_(conf, destParentDir, 5, fnCallback);
226227
}
227228
} catch (e) {

0 commit comments

Comments
 (0)