MCPcopy Index your code
hub / github.com/anomalyco/opencode / resolvePath

Function resolvePath

packages/core/src/git.ts:981–987  ·  view source on GitHub ↗
(cwd: string, value: string)

Source from the content-addressed store, hash-verified

979}
980
981function resolvePath(cwd: string, value: string) {
982 const trimmed = value.replace(/[\r\n]+$/, "")
983 if (!trimmed) return cwd
984 const normalized = FSUtil.windowsPath(trimmed)
985 if (path.isAbsolute(normalized)) return path.normalize(normalized)
986 return path.resolve(cwd, normalized)
987}

Callers 2

git.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected