@@ -1239,7 +1239,7 @@ class BinaryControl {
1239
1239
try {
1240
1240
await this._makeDirectory();
1241
1241
core.debug('BrowserStackLocal binary not found in cache. Deleting any stale/existing binary before downloading...');
1242
- this._removeAnyStaleBinary();
1242
+ await this._removeAnyStaleBinary();
1243
1243
1244
1244
core.info('Downloading BrowserStackLocal binary...');
1245
1245
const downloadPath = await tc.downloadTool(
@@ -1259,6 +1259,7 @@ class BinaryControl {
1259
1259
* Starts Local Binary using the args generated for this action
1260
1260
*/
1261
1261
async startBinary() {
1262
+ this._generateArgsForBinary();
1262
1263
let { localIdentifier } = this.stateForBinary;
1263
1264
localIdentifier = localIdentifier ? `with local-identifier=${localIdentifier}` : '';
1264
1265
core.info(`Starting local tunnel ${localIdentifier} in daemon mode...`);
@@ -1267,8 +1268,6 @@ class BinaryControl {
1267
1268
1268
1269
while (triesAvailable--) {
1269
1270
try {
1270
- this._generateArgsForBinary();
1271
-
1272
1271
// eslint-disable-next-line no-await-in-loop
1273
1272
const { output, error } = await this._triggerBinary(LOCAL_TESTING.START);
1274
1273
@@ -1299,8 +1298,8 @@ class BinaryControl {
1299
1298
* Stops Local Binary using the args generated for this action
1300
1299
*/
1301
1300
async stopBinary() {
1301
+ this._generateArgsForBinary();
1302
1302
try {
1303
- this._generateArgsForBinary();
1304
1303
let { localIdentifier } = this.stateForBinary;
1305
1304
localIdentifier = localIdentifier ? `with local-identifier=${localIdentifier}` : '';
1306
1305
core.info(`Stopping local tunnel ${localIdentifier} in daemon mode...`);
0 commit comments