()
| 31 | // only where a display is reachable (a logged-in console, or a guest under |
| 32 | // autologin/Xvfb) and skips honestly elsewhere rather than hanging on launch. |
| 33 | const guiAvailable = (): boolean => { |
| 34 | if (process.platform === "darwin") { |
| 35 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: probing the session manager; absence = no GUI |
| 36 | try { |
| 37 | return execFileSync("launchctl", ["managername"], { encoding: "utf8" }).trim() === "Aqua"; |
| 38 | } catch { |
| 39 | return false; |
| 40 | } |
| 41 | } |
| 42 | if (process.platform === "linux") { |
| 43 | return Boolean(process.env.DISPLAY || process.env.WAYLAND_DISPLAY); |
| 44 | } |
| 45 | return true; // windows: the runner places this in an interactive session |
| 46 | }; |
| 47 | |
| 48 | const SCENARIO_NAME = "Desktop (packaged) · the real bundle attaches to the OS-supervised daemon"; |
| 49 |
no outgoing calls
no test coverage detected