MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Home

Function Home

internal/pathutil/pathutil.go:16–24  ·  view source on GitHub ↗

Home returns the user's home directory. The HOME environment variable wins so tests and callers can intentionally isolate filesystem behavior on all platforms, including Windows where os.UserHomeDir does not follow HOME.

()

Source from the content-addressed store, hash-verified

14// tests and callers can intentionally isolate filesystem behavior on all
15// platforms, including Windows where os.UserHomeDir does not follow HOME.
16func Home() string {
17 if dir := os.Getenv("HOME"); dir != "" {
18 return dir
19 }
20 if dir, err := os.UserHomeDir(); err == nil && dir != "" {
21 return dir
22 }
23 return ""
24}
25
26func joinHome(path string) string {
27 home := Home()

Callers 8

configListCommandMethod · 0.92
expandPathFunction · 0.92
installFromLocalFunction · 0.92
FindFunction · 0.92
joinHomeFunction · 0.85
ExpandFunction · 0.85
ConfigDirFunction · 0.85
CacheDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected