Skip to content

Commit f36d261

Browse files
Akos Kittakittaakos
Akos Kitta
authored andcommitted
[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>
1 parent a990936 commit f36d261

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arduino-ide-extension/src/node/sketches-service-impl.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,12 @@ export class SketchesServiceImpl implements SketchesService {
195195
}
196196
}
197197
});
198-
await watcher.start();
198+
199+
// TODO: no `await` for some reason this blocks the workspace root initialization on Windows inside a bundled electron app.
200+
watcher.start()
201+
.then(() => console.log(`Initialized NSFW in sketchbook: '${sketchbookPath}. Watching for sketch changes.`))
202+
.catch(err => console.error(`Failed to initialize NSFW in sketchbook '${sketchbookPath}'. Cannot track sketch changes.`, err));
203+
199204
deferred.resolve(sketches);
200205
this.sketchbooks.set(sketchbookPath, sketches);
201206
return sketches;

0 commit comments

Comments
 (0)