Files
core/paths/errors.go
T
terminar 13801bec11 Add platform-independent path/config resolution library
Implements core/paths (Config/Data/State/Cache/Runtime/Log/Bin
directory resolution with canonical-vs-search-dir separation, XDG on
Unix, native APPDATA/LOCALAPPDATA/PROGRAMDATA layering on Windows,
~/Library on macOS Desktop, injectable environment/platform for
deterministic cross-platform tests) and core/config (file search,
first-match resolution, layered YAML merging, safe ${VAR} expansion,
Explain/doctor introspection) on top of the shared Application/
Kind/Scope model in the core package.
2026-09-19 16:26:01 +02:00

17 lines
779 B
Go

package paths
import "errors"
// ErrRuntimeDirUnavailable is returned by Resolver.RuntimeDir when no
// runtime directory override is set and the platform's native runtime
// directory mechanism (XDG_RUNTIME_DIR on Unix) is not available. Per
// AGENTS.md/spec section 8, this must never be silently papered over with
// a fabricated fallback location -- callers decide what to do (fall back
// to a temp dir themselves, error out, ...).
var ErrRuntimeDirUnavailable = errors.New("paths: runtime directory not available")
// ErrNoHomeDirectory is returned when a computation needs the user's home
// directory (HOME on Unix, USERPROFILE on Windows) and it is not set in
// the Resolver's Environment.
var ErrNoHomeDirectory = errors.New("paths: home directory not available")