Skip to content

Commit 1338edb

Browse files
committed
moved exit code last
1 parent c2deff8 commit 1338edb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/helpers/reporterHTML.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ function getReportResponse(filePath, fileName, reportJsonUrl) {
124124
writer.on('error', err => {
125125
error = err;
126126
writer.close();
127-
process.exitCode = Constants.ERROR_EXIT_CODE;
128127
reject(err);
128+
process.exitCode = Constants.ERROR_EXIT_CODE;
129129
});
130130
writer.on('close', async () => {
131131
if (!error) {
@@ -149,8 +149,8 @@ const unzipFile = async (filePath, fileName) => {
149149
.then(d => d.extract({path: filePath, concurrency: 5}))
150150
.catch((err) => {
151151
logger.debug(`Unzipping html and json report failed. Error: ${err}`);
152-
process.exitCode = Constants.ERROR_EXIT_CODE;
153152
reject(err);
153+
process.exitCode = Constants.ERROR_EXIT_CODE;
154154
});
155155
logger.debug("Unzipped the json and html successfully.")
156156
resolve();

0 commit comments

Comments
 (0)