Skip to content

Commit d84fb5b

Browse files
author
CrewCoder
committed
fix: YuHeard test CI fail fix
1 parent 992adee commit d84fb5b

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/main/pty-service.yuheard.test.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ const mocks = vi.hoisted(() => ({
1212
}))
1313

1414
vi.mock('node-pty', () => ({ spawn: mocks.spawn }))
15+
vi.mock('fs', async (importOriginal) => {
16+
const actual = await importOriginal<typeof import('fs')>()
17+
return {
18+
...actual,
19+
// GitHub runners do not install Fish. Keep shell discovery out of this
20+
// file: pretend the first POSIX candidate exists so spawn stays Fish.
21+
existsSync: (p: Parameters<typeof actual.existsSync>[0]) =>
22+
String(p) === '/usr/bin/fish' || actual.existsSync(p),
23+
}
24+
})
1525
vi.mock('./yuheard-wrapper', () => ({
1626
bashKeepWrapPrompt: vi.fn((dir: string) => `PATH=${dir}:$PATH`),
1727
codexNotifyArgv: vi.fn(() => ['-c', 'notify=[]']),

0 commit comments

Comments
 (0)