fix(coding-agent): handle async fs.watch error events in theme watcher

closes #2791
This commit is contained in:
Mario Zechner
2026-04-04 20:51:34 +02:00
parent 72a43dc063
commit 5e5eeb9603
3 changed files with 115 additions and 0 deletions

View File

@@ -798,6 +798,14 @@ function startThemeWatcher(): void {
}
scheduleReload();
});
themeWatcher.on("error", () => {
try {
themeWatcher?.close();
} catch {
/* ignore */
}
themeWatcher = undefined;
});
} catch (_error) {
// Ignore errors starting watcher
}