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