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