Commit f5705cd
fix: non-blocking browser launch in Pi extension (Linux) (#292)
* fix: use non-blocking spawn for browser launch in Pi extension
execSync(xdg-open ...) blocks the Node.js event loop, preventing the
HTTP server from responding to the browser's initial request on Linux
desktops where xdg-open doesn't immediately exit.
Closes #288
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: handle async spawn errors in Pi openBrowser
spawn() reports missing-command failures asynchronously via an 'error'
event. Without a listener, a bad PLANNOTATOR_BROWSER or missing
xdg-open crashes the Pi process. Add child.once("error", () => {})
to swallow it silently, matching the original execSync try/catch
behavior.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d2238ac commit f5705cd
1 file changed
Lines changed: 20 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | | - | |
| 65 | + | |
| 66 | + | |
62 | 67 | | |
63 | | - | |
| 68 | + | |
| 69 | + | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | | - | |
| 75 | + | |
| 76 | + | |
69 | 77 | | |
70 | | - | |
| 78 | + | |
| 79 | + | |
71 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
72 | 85 | | |
73 | 86 | | |
74 | 87 | | |
| |||
0 commit comments