MCPcopy Create free account
hub / github.com/diegosouzapw/OmniRoute / parseShellPathOutput

Function parseShellPathOutput

src/shared/services/loginShellPath.ts:34–42  ·  view source on GitHub ↗
(output: string)

Source from the content-addressed store, hash-verified

32
33/** Extract the value of the `PATH=` line from `env`-style shell output. */
34export function parseShellPathOutput(output: string): string | null {
35 if (!output) return null;
36 for (const line of output.split("\n")) {
37 if (line.startsWith("PATH=")) {
38 return line.slice("PATH=".length).trim() || null;
39 }
40 }
41 return null;
42}
43
44export interface LoginShellPathOptions {
45 platform?: NodeJS.Platform;

Callers 2

getLoginShellPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected