Skip to content

Commit

Permalink
fix: incorrect count of watch files being reported
Browse files Browse the repository at this point in the history
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
  • Loading branch information
remy committed Dec 29, 2017
1 parent 7052648 commit 7a04e2c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/monitor/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,7 @@ function watch() {
});

return Promise.all(promises).then(function (res) {
var total = res.reduce(function (acc, curr) {
acc += curr;
return acc;
}, 0);

var count = total.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
utils.log.detail('watching ' + count + ' files');
utils.log.detail(`watching ${watchedFiles.length} file${watchedFiles.length === 1 ? '' : 's'}`);
return watchedFiles;
});
}
Expand Down

0 comments on commit 7a04e2c

Please sign in to comment.