Skip to content

Commit eafc8eb

Browse files
authored
Merge pull request #275 from getagentseal/fix/menubar-installer-wait
Wait for old menubar process to exit before launching new one
2 parents 63d4da6 + b777730 commit eafc8eb

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/menubar-installer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ async function killRunningApp(): Promise<void> {
142142
proc.on('close', () => resolve())
143143
proc.on('error', () => resolve())
144144
})
145+
for (let i = 0; i < 10; i++) {
146+
if (!(await isAppRunning())) return
147+
await new Promise(r => setTimeout(r, 500))
148+
}
145149
}
146150

147151
export async function installMenubarApp(options: { force?: boolean } = {}): Promise<InstallResult> {

0 commit comments

Comments
 (0)