MCPcopy Index your code
hub / github.com/coder/mux / resolveRuntimePath

Function resolveRuntimePath

src/node/utils/git/ensureGitInfoExclude.ts:80–86  ·  view source on GitHub ↗
(workspacePath: string, gitPath: string)

Source from the content-addressed store, hash-verified

78}
79
80function resolveRuntimePath(workspacePath: string, gitPath: string): string {
81 assert(gitPath.trim().length > 0, "git exclude path is required");
82 if (path.isAbsolute(gitPath) || /^[/~]/u.test(gitPath) || /^[A-Za-z]:[\\/]/u.test(gitPath)) {
83 return gitPath;
84 }
85 return `${workspacePath.replace(/[\\/]+$/u, "")}/${gitPath}`;
86}

Callers 1

ensureGitInfoExcludeFunction · 0.85

Calls 3

isAbsoluteMethod · 0.80
testMethod · 0.80
assertFunction · 0.50

Tested by

no test coverage detected