Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/providers/src/detector.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ describe('findBinary', () => {
await mkdir(join(early, 'codex'), { recursive: true })
await mkdir(later, { recursive: true })
await writeFileSafe(join(later, 'codex'), '')
// Pinned to posix: on win32 the bare name is not a runnable candidate.
const env: DetectEnvironment = {
...makeEnv(),
platform: 'linux',
pathEnv: [early, later].join(delimiter),
}
expect(findBinary('codex', env)).toBe(join(later, 'codex'))
Expand All @@ -126,8 +128,10 @@ describe('findBinary', () => {
const later = join(dir, 'later-readable')
await mkdir(later, { recursive: true })
await writeFileSafe(join(later, 'codex'), '')
// Pinned to posix so the later candidate is the bare name this case writes.
const env: DetectEnvironment = {
...makeEnv(),
platform: 'linux',
pathEnv: [notADir, later].join(delimiter),
}
expect(findBinary('codex', env)).toBe(join(later, 'codex'))
Expand Down
Loading