* Fix Fish shell PATH detection for Codex * refactor(provider): resolve lint warnings in provider layers * refactor(terminal): simplify thread lock release initialization * test(git): simplify fetch release callback initialization
16 lines
379 B
TypeScript
16 lines
379 B
TypeScript
import { readPathFromLoginShell } from "@t3tools/shared/shell";
|
|
|
|
export function fixPath(): void {
|
|
if (process.platform !== "darwin") return;
|
|
|
|
try {
|
|
const shell = process.env.SHELL ?? "/bin/zsh";
|
|
const result = readPathFromLoginShell(shell);
|
|
if (result) {
|
|
process.env.PATH = result;
|
|
}
|
|
} catch {
|
|
// Keep inherited PATH if shell lookup fails.
|
|
}
|
|
}
|