Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

fixPath.ts

15 lines379 Bytes

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 }