mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 09:07:40 +00:00
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:
@@ -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', () => {
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user