Skip to content

Commit 39cb8b2

Browse files
committed
Fix for display of browserstack.json is invalid message
1 parent d8bd069 commit 39cb8b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/commands/runs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ module.exports = function run(args) {
6060
}).catch(function (err) {
6161
// browerstack.json is not valid
6262
logger.error(err);
63-
logger.error(Constants.validationMessages.NOT_VALID);
63+
64+
// display browserstack.json is not valid only if validation of browserstack.json field has failed, otherwise display just the error message
65+
// If paralles specified in arguments are invalid do not display browserstack.json is invalid message
66+
if (!(err === Constants.validationMessages.INVALID_PARALLELS_CONFIGURATION && !utils.isUndefined(args.parallels))) {
67+
logger.error(Constants.validationMessages.NOT_VALID);
68+
}
6469

6570
let error_code = utils.getErrorCodeFromMsg(err);
6671
utils.sendUsageReport(bsConfig, args, `${err}\n${Constants.validationMessages.NOT_VALID}`, Constants.messageTypes.ERROR, error_code);

0 commit comments

Comments
 (0)