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.
This commit is contained in:
1 parent
027b327c3d
commit
13801bec11
41 files changed
+4834
-2
No files matched your search
@@ -0,0 +1,16 @@
|
||||
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")
|
||||
Reference in new issue
Block a user