From e18ec8ea4474343409aaec7086bb259a8fa3e698 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Wed, 17 Mar 2021 21:22:09 -0500 Subject: [PATCH] fix: _addWatchers --- lib/paths-cache.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/paths-cache.js b/lib/paths-cache.js index 717bc19..de401b1 100644 --- a/lib/paths-cache.js +++ b/lib/paths-cache.js @@ -147,6 +147,18 @@ export default class PathsCache extends EventEmitter { this._repositories = repositories.filter((r) => r !== null) // filter out non-repository directories } + /** + * Add watchers for all the projectDirectories + * @return {Promise>} + * @private + */ + async _addWatchers() { + const result = await Promise.all( + this._projectDirectories.map((projectDirectory) => this._addWatcherForDirectory(projectDirectory)) + ) + return result + } + /** * Add a watcher for the projectDirectory * @param {Directory} projectDirectory