MCPcopy Create free account
hub / github.com/anomalyco/opencode / resolvePath

Function resolvePath

packages/opencode/src/acp/tool.ts:284–288  ·  view source on GitHub ↗
(value: string | undefined, cwd?: string)

Source from the content-addressed store, hash-verified

282}
283
284function resolvePath(value: string | undefined, cwd?: string) {
285 if (!value) return undefined
286 if (isAbsolute(value)) return value
287 return resolve(cwd ?? process.cwd(), value)
288}
289
290function shellCommand(input: ToolInput) {
291 return stringValue(input.command) ?? stringValue(input.cmd)

Callers 2

shellWorkdirFunction · 0.70
shell.tsFile · 0.50

Calls 2

cwdMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected