mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
fix(coding-agent): handle async fs.watch error events in theme watcher
closes #2791
This commit is contained in:
@@ -798,6 +798,14 @@ function startThemeWatcher(): void {
|
||||
}
|
||||
scheduleReload();
|
||||
});
|
||||
themeWatcher.on("error", () => {
|
||||
try {
|
||||
themeWatcher?.close();
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
themeWatcher = undefined;
|
||||
});
|
||||
} catch (_error) {
|
||||
// Ignore errors starting watcher
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user