Skip to content

Commit 0e0494e

Browse files
committed
Keep CLI args as priority
1 parent 6b72ae6 commit 0e0494e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

bin/helpers/utils.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,10 +1365,12 @@ exports.setVideoCliConfig = (bsConfig, videoConfig) => {
13651365
let user_cypress_version = (bsConfig && bsConfig.run_settings && bsConfig.run_settings.cypress_version) ? bsConfig.run_settings.cypress_version.toString() : undefined;
13661366
let cypress_major_version = (user_cypress_version && user_cypress_version.match(/^(\d+)/)) ? user_cypress_version.split(".")[0] : undefined;
13671367
let config_args = (bsConfig && bsConfig.run_settings && bsConfig.run_settings.config) ? bsConfig.run_settings.config : undefined;
1368-
if(this.isUndefined(user_cypress_version) || this.isUndefined(cypress_major_version) || parseInt(cypress_major_version) >= 13 ) {
1369-
let video_args = `video=${videoConfig.video},videoUploadOnPasses=${videoConfig.videoUploadOnPasses}`;
1370-
config_args = this.isUndefined(config_args) ? video_args : config_args + ',' + video_args;
1371-
logger.debug(`Setting default video true for cypress 13 and above in cli for cypress version ${user_cypress_version} with cli args - ${config_args}`)
1368+
if(config_args && !config_args.includes('video')) {
1369+
if(this.isUndefined(user_cypress_version) || this.isUndefined(cypress_major_version) || parseInt(cypress_major_version) >= 13 ) {
1370+
let video_args = `video=${videoConfig.video},videoUploadOnPasses=${videoConfig.videoUploadOnPasses}`;
1371+
config_args = this.isUndefined(config_args) ? video_args : config_args + ',' + video_args;
1372+
logger.debug(`Setting default video true for cypress 13 and above in cli for cypress version ${user_cypress_version} with cli args - ${config_args}`)
1373+
}
13721374
}
13731375
if (bsConfig.run_settings && this.isNotUndefined(config_args)) bsConfig["run_settings"]["config"] = config_args;
13741376
}

0 commit comments

Comments
 (0)