(conn: SidecarConnection)
| 183 | const normalizedPath = (path: string): string => path.replaceAll("\\", "/"); |
| 184 | |
| 185 | const shouldReplaceDaemonForDesktop = (conn: SidecarConnection): boolean => { |
| 186 | if (shouldUpgradeDaemonForDesktop(conn.ownerVersion)) return true; |
| 187 | if (!app.isPackaged) return false; |
| 188 | const ownerPath = conn.ownerExecutablePath; |
| 189 | if (!ownerPath) return false; |
| 190 | if (!existsSync(ownerPath)) return true; |
| 191 | if (conn.ownerClient !== "desktop") return false; |
| 192 | return normalizedPath(ownerPath) !== normalizedPath(bundledExecutorPath()); |
| 193 | }; |
| 194 | |
| 195 | /** Poll for a reachable supervised daemon until the deadline. */ |
| 196 | const waitForSupervisedAttach = async ( |
no test coverage detected