Skip to content

Commit 7a04e2c

Browse files
committed
fix: incorrect count of watch files being reported
The number of watched files was correct, but showed (incorrectly) a cumulative total of watched files (i.e. 1 + 2 + 3 + 4 etc). Fixes #1194
1 parent 7052648 commit 7a04e2c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

lib/monitor/watch.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,7 @@ function watch() {
108108
});
109109

110110
return Promise.all(promises).then(function (res) {
111-
var total = res.reduce(function (acc, curr) {
112-
acc += curr;
113-
return acc;
114-
}, 0);
115-
116-
var count = total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
117-
utils.log.detail('watching ' + count + ' files');
111+
utils.log.detail(`watching ${watchedFiles.length} file${watchedFiles.length === 1 ? '' : 's'}`);
118112
return watchedFiles;
119113
});
120114
}

0 commit comments

Comments
 (0)