(conn: SidecarConnection)
| 216 | const normalizedPath = (path: string): string => path.replaceAll("\\", "/"); |
| 217 | |
| 218 | const shouldReplaceDaemonForDesktop = (conn: SidecarConnection): boolean => { |
| 219 | if (shouldUpgradeDaemonForDesktop(conn.ownerVersion)) return true; |
| 220 | if (!app.isPackaged) return false; |
| 221 | const ownerPath = conn.ownerExecutablePath; |
| 222 | if (!ownerPath) return false; |
| 223 | if (!existsSync(ownerPath)) return true; |
| 224 | if (conn.ownerClient !== "desktop") return false; |
| 225 | return normalizedPath(ownerPath) !== normalizedPath(bundledExecutorPath()); |
| 226 | }; |
| 227 | |
| 228 | /** Poll for a reachable supervised daemon until the deadline. */ |
| 229 | const waitForSupervisedAttach = async ( |
no test coverage detected