mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 08:03:37 +00:00
fix(macos): scope deferred daemon retirement
This commit is contained in:
@@ -585,7 +585,9 @@ describe('daemon-init: runRestartDaemon (7-step sequence)', () => {
|
||||
|
||||
await mod.initDaemonPtyProvider()
|
||||
|
||||
expect(adapterInstances[0].options.packagedAppVersion).toBe('1.2.3')
|
||||
expect(adapterInstances[0].options.packagedAppVersion).toBe(
|
||||
process.platform === 'darwin' ? '1.2.3' : null
|
||||
)
|
||||
})
|
||||
|
||||
it('uses daemon-owned idle retirement when a fresh launch fails permanent adoption', async () => {
|
||||
|
||||
@@ -962,7 +962,7 @@ export async function initDaemonPtyProvider(
|
||||
pidPath: getDaemonPidPath(runtimeDir),
|
||||
profileScope: runtimeDir,
|
||||
runtimeDir,
|
||||
packagedAppVersion: app.isPackaged ? app.getVersion() : null,
|
||||
packagedAppVersion: process.platform === 'darwin' && app.isPackaged ? app.getVersion() : null,
|
||||
historyPath: getHistoryDir(),
|
||||
// Why: on daemon death, ensureConnected() detects the dead socket and calls this to fork a replacement before retrying.
|
||||
respawn: async (reason: DaemonRespawnReason) => {
|
||||
@@ -1198,7 +1198,7 @@ async function runRestartDaemon(): Promise<RestartDaemonResult> {
|
||||
pidPath: getDaemonPidPath(runtimeDir),
|
||||
profileScope: runtimeDir,
|
||||
runtimeDir,
|
||||
packagedAppVersion: app.isPackaged ? app.getVersion() : null,
|
||||
packagedAppVersion: process.platform === 'darwin' && app.isPackaged ? app.getVersion() : null,
|
||||
historyPath: getHistoryDir(),
|
||||
respawn: async (reason: DaemonRespawnReason) => {
|
||||
// Why: attribute rather than emit — the launcher below is the one that completes the
|
||||
|
||||
Reference in New Issue
Block a user