MCPcopy Create free account
hub / github.com/catppuccin/cli / UserHomeDir

Function UserHomeDir

internal/utils/utils.go:48–57  ·  view source on GitHub ↗

UserHomeDir gets the user's home directory

()

Source from the content-addressed store, hash-verified

46
47// UserHomeDir gets the user's home directory
48func UserHomeDir() string {
49 if runtime.GOOS == "windows" {
50 home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
51 if home == "" {
52 home = os.Getenv("USERPROFILE")
53 }
54 return home
55 }
56 return os.Getenv("HOME")
57}
58
59// DieIfError kills the program if err is not nil.
60// func DieIfError(err error, message string) {

Callers 1

ShareDirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected