Open History to see the last commit
1import { readPathFromLoginShell } from "@t3tools/shared/shell";
2
3export function fixPath(): void {
4 if (process.platform !== "darwin") return;
5
6 try {
7 const shell = process.env.SHELL ?? "/bin/zsh";
8 const result = readPathFromLoginShell(shell);
9 if (result) {
10 process.env.PATH = result;
11 }
12 } catch {
13 // Keep inherited PATH if shell lookup fails.
14 }
15}