MCPcopy Create free account
hub / github.com/compozy/agh / currentWorkingDirectory

Function currentWorkingDirectory

internal/cli/root.go:423–437  ·  view source on GitHub ↗
(deps commandDeps)

Source from the content-addressed store, hash-verified

421}
422
423func currentWorkingDirectory(deps commandDeps) (string, error) {
424 if deps.getwd == nil {
425 return "", errors.New("cli: getwd dependency is required")
426 }
427
428 wd, err := deps.getwd()
429 if err != nil {
430 return "", fmt.Errorf("cli: resolve current working directory: %w", err)
431 }
432 wd = strings.TrimSpace(wd)
433 if wd == "" {
434 return "", errors.New("cli: current working directory is empty")
435 }
436 return wd, nil
437}

Callers 13

resolveWorkspaceInfoRefFunction · 0.85
newConfigPathCommandFunction · 0.85
loadConfigForDisplayFunction · 0.85
configWriteTargetFunction · 0.85
resolveCLIWorkspaceRootFunction · 0.85
newMemoryHealthCommandFunction · 0.85

Calls

no outgoing calls

Tested by 1