Skip to content

Commit 009cded

Browse files
committed
fixed exit status accrual for batch
1 parent 48115c7 commit 009cded

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

bin/webpagetest

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ function parseBatch(filename) {
215215
//return console.log(parseBatch('batch.txt'));
216216

217217
function batch(file) {
218-
var accErr,
218+
var accErr = 0,
219219
count = 2,
220220
originalFormatData = formatData,
221221
originalOutput = output;
@@ -225,13 +225,13 @@ function batch(file) {
225225
if (!count) {
226226
originalOutput(
227227
results.length ? JSON.stringify(results, null, 2) : '',
228-
accErr ? 1 : 0
228+
accErr
229229
);
230230
}
231231
};
232232

233233
function checkError(err) {
234-
accErr = accErr || err;
234+
accErr += err ? 1 : 0;
235235
checkDone();
236236
}
237237

0 commit comments

Comments
 (0)