Skip to content

Commit a8ebf1e

Browse files
Fix Local Inferred logic
1 parent 6210a6c commit a8ebf1e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/helpers/utils.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,10 @@ exports.setLocal = (bsConfig, args) => {
342342
logger.info(
343343
'Reading local setting from the environment variable BROWSERSTACK_LOCAL'
344344
);
345-
} else if (!this.isUndefined(args.localMode)) {
345+
} else if (
346+
this.isUndefined(bsConfig['connection_settings']['local']) &&
347+
( !this.isUndefined(args.localMode) || !this.isUndefined(bsConfig['connection_settings']['local_mode']) )
348+
) {
346349
bsConfig['connection_settings']['local'] = true;
347350
bsConfig.connection_settings.local_inferred = localInferred;
348351
}

test/unit/bin/helpers/utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,6 @@ describe('utils', () => {
674674
it('bsconfig connection_settings local_inferred as true if serachforOption returns false with args local-mode true', () => {
675675
let bsConfig = {
676676
connection_settings: {
677-
"local": false
678677
}
679678
};
680679
let args = {

0 commit comments

Comments
 (0)