MCPcopy Create free account
hub / github.com/dagger/dagger / normalizePath

Method normalizePath

modules/doug/main.go:712–714  ·  view source on GitHub ↗

FIXME: MCP services and tools in general strongly recommend using absolute paths. but in Dagger, MCP services run in their own sandbox, so for any hope of sanity the user should really configure the same mount point across all of them, like /workspace. but, even so, Doug works with relative paths,

(filePath string)

Source from the content-addressed store, hash-verified

710// but, even so, Doug works with relative paths, so we'll just clunkily strip
711// the prefix when it comes up.
712func (d *Doug) normalizePath(filePath string) string {
713 return strings.TrimPrefix(filePath, d.WorkspacePath)
714}

Callers 4

ReadFileMethod · 0.95
EditFileMethod · 0.95
WriteMethod · 0.95
GrepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected