MCPcopy Create free account
hub / github.com/coder/mux / expandHomePath

Function expandHomePath

src/node/runtime/sshConfigParser.ts:40–50  ·  view source on GitHub ↗
(value: string, homeDir: string)

Source from the content-addressed store, hash-verified

38}
39
40function expandHomePath(value: string, homeDir: string): string {
41 if (value === "~") {
42 return homeDir;
43 }
44
45 if (value.startsWith("~/") || value.startsWith("~\\")) {
46 return path.join(homeDir, value.slice(2));
47 }
48
49 return value;
50}
51
52function normalizeIdentityFile(value: string, homeDir: string): string {
53 const expanded = expandHomePath(value, homeDir);

Callers 1

normalizeIdentityFileFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected