Skip to content

Commit e29c704

Browse files
handled downloads key
1 parent c69d2df commit e29c704

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

commands/utils/poller/poller.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ function poll_build(lt_config, session_id, env) {
4040
}
4141
console.table(status);
4242
console.log(stats);
43-
//Download the artefacts
44-
let args = {
45-
user: lt_config.lambdatest_auth.username,
46-
access_key: lt_config.lambdatest_auth.access_key,
47-
session_id: session_id,
48-
env: env,
49-
reject_unauthorized: lt_config.run_settings.reject_unauthorized,
50-
};
51-
reports(args);
43+
//Download the artefacts if downloads is passed
44+
if (lt_config.run_settings.downloads != "") {
45+
let args = {
46+
user: lt_config.lambdatest_auth.username,
47+
access_key: lt_config.lambdatest_auth.access_key,
48+
session_id: session_id,
49+
env: env,
50+
reject_unauthorized:
51+
lt_config.run_settings.reject_unauthorized,
52+
};
53+
reports(args);
54+
}
5255
if (
5356
Object.keys(stats).length == 1 &&
5457
(Object.keys(stats).includes("completed") ||

0 commit comments

Comments
 (0)