fix(agent-awake): release macOS sleep assertions when Orca exits (#35649)

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
OrcaWin
2026-10-29 15:00:05 -07:00
committed by GitHub
co-authored by OrcaWin
parent c2cc986a8d
commit 35124e4252
2 changed files with 9 additions and 5 deletions
@@ -32,10 +32,14 @@ describe('MacosSystemSleepAssertion', () => {
assertion.start('status-change')
expect(spawn).toHaveBeenCalledWith('/usr/bin/caffeinate', ['-i', '-s'], {
stdio: 'ignore',
windowsHide: true
})
expect(spawn).toHaveBeenCalledWith(
'/usr/bin/caffeinate',
['-i', '-s', '-w', String(process.pid)],
{
stdio: 'ignore',
windowsHide: true
}
)
})
it('is a no-op off macOS', () => {
+1 -1
View File
@@ -71,7 +71,7 @@ export class MacosSystemSleepAssertion {
let child: CaffeinateProcess
try {
child = this.spawn('/usr/bin/caffeinate', ['-i', '-s'], {
child = this.spawn('/usr/bin/caffeinate', ['-i', '-s', '-w', String(process.pid)], {
stdio: 'ignore',
windowsHide: true
})