Skip to content

Commit 9e06f24

Browse files
Karan NagpalKaran Nagpal
authored andcommitted
exit code for report generation and download artifacts error
1 parent 61c3210 commit 9e06f24

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

bin/helpers/buildArtifacts.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,6 @@ exports.downloadBuildArtifacts = async (bsConfig, buildId, args) => {
214214
}
215215

216216
utils.sendUsageReport(bsConfig, args, err, messageType, errorCode);
217+
process.exitCode = Constants.ERROR_EXIT_CODE;
217218
}
218219
};

bin/helpers/reporterHTML.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,10 @@ function generateCypressCombinationSpecReportDataWithConfigJson(combination){
277277
});
278278
combination.tests = sessionTests;
279279
resolve(combination.tests);
280-
} catch (error) { reject(error) }
280+
} catch (error) {
281+
process.exitCode = Constants.ERROR_EXIT_CODE;
282+
reject(error);
283+
}
281284
})
282285
}
283286

@@ -308,7 +311,10 @@ function generateCypressCombinationSpecReportDataWithoutConfigJson(combination){
308311
});
309312
combination.tests = sessionTests;
310313
resolve(combination.tests);
311-
} catch (error) { reject(error) }
314+
} catch (error) {
315+
process.exitCode = Constants.ERROR_EXIT_CODE;
316+
reject(error);
317+
}
312318
})
313319
}
314320

0 commit comments

Comments
 (0)