MCPcopy Create free account
hub / github.com/driangle/taskmd / globalConfigPath

Function globalConfigPath

apps/cli/internal/cli/registry.go:138–147  ·  view source on GitHub ↗

globalConfigPath returns the path to the global config file. Checks $TASKMD_HOME_CONFIG first, then falls back to ~/.taskmd.yaml.

()

Source from the content-addressed store, hash-verified

136// globalConfigPath returns the path to the global config file.
137// Checks $TASKMD_HOME_CONFIG first, then falls back to ~/.taskmd.yaml.
138func globalConfigPath() (string, error) {
139 if env := os.Getenv("TASKMD_HOME_CONFIG"); env != "" {
140 return expandTilde(env)
141 }
142 home, err := os.UserHomeDir()
143 if err != nil {
144 return "", fmt.Errorf("get home directory: %w", err)
145 }
146 return filepath.Join(home, ".taskmd.yaml"), nil
147}
148
149// resolvePath expands tilde and makes relative paths absolute against baseDir.
150func resolvePath(path, baseDir string) (string, error) {

Callers 5

registerProjectFunction · 0.85
runProjectUnregisterFunction · 0.85
LoadGlobalRegistryFunction · 0.85
LoadDefaultProjectFunction · 0.85

Calls 1

expandTildeFunction · 0.85

Tested by 1