(conn: SidecarConnection)
| 172 | const normalizedPath = (path: string): string => path.replaceAll("\\", "/"); |
| 173 | |
| 174 | const shouldReplaceDaemonForDesktop = (conn: SidecarConnection): boolean => { |
| 175 | if (shouldUpgradeDaemonForDesktop(conn.ownerVersion)) return true; |
| 176 | if (!app.isPackaged) return false; |
| 177 | const ownerPath = conn.ownerExecutablePath; |
| 178 | if (!ownerPath) return false; |
| 179 | if (!existsSync(ownerPath)) return true; |
| 180 | if (conn.ownerClient !== "desktop") return false; |
| 181 | return normalizedPath(ownerPath) !== normalizedPath(bundledExecutorPath()); |
| 182 | }; |
| 183 | |
| 184 | /** Poll for a reachable supervised daemon until the deadline. */ |
| 185 | const waitForSupervisedAttach = async ( |
no test coverage detected