[debug]: No await for the watcher in sketchbook.

This seems to block the workspace init on Windows in bundled electron.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2021-01-29 18:40:33 +01:00 committed by Akos Kitta
parent a99093624f
commit f36d261dcd

View File

@ -195,7 +195,12 @@ export class SketchesServiceImpl implements SketchesService {
}
}
});
await watcher.start();
// TODO: no `await` for some reason this blocks the workspace root initialization on Windows inside a bundled electron app.
watcher.start()
.then(() => console.log(`Initialized NSFW in sketchbook: '${sketchbookPath}. Watching for sketch changes.`))
.catch(err => console.error(`Failed to initialize NSFW in sketchbook '${sketchbookPath}'. Cannot track sketch changes.`, err));
deferred.resolve(sketches);
this.sketchbooks.set(sketchbookPath, sketches);
return sketches;