Skip to content

Commit 1bcf5ab

Browse files
authored
Merge pull request #302 from HRanjan-11/CYP-884
fixed cli exit behaviour
2 parents dcd7e38 + 2800dbe commit 1bcf5ab

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

commands/generate_reports.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ function download_artefact(
8484
if (resp.data != null) {
8585
const responseObject = resp.data;
8686
const dataValue = responseObject.data;
87-
reject("Could not download artefacts for test id " + test_id + " with reason " + dataValue);
87+
if (dataValue != null) {
88+
reject("Could not download artefacts for test id " + test_id + " with reason " + dataValue);
89+
} else {
90+
reject("Could not download artefacts for test id " + test_id);
91+
}
8892
}
8993
reject("Could not download artefacts for test id " + test_id);
9094
}

commands/run.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,15 @@ module.exports = function (args) {
151151
.then(function (exit_code) {
152152
if (lt_config["run_settings"]["exit-on-failure"]) {
153153
process.exit(exit_code);
154+
} else {
155+
process.exit(0);
154156
}
155157
})
156158
.catch(function (error) {
157159
if (lt_config["run_settings"]["exit-on-failure"]) {
158160
process.exit(1);
161+
} else {
162+
process.exit(0);
159163
}
160164
});
161165
}

0 commit comments

Comments
 (0)