paths: skip the user search tier when there is no home directory
ConfigSearchDirs/DataSearchDirs/ExecutableSearchDirs (and therefore core/config's Resolve/ResolveAll/LoadMerged) failed outright with ErrNoHomeDirectory when HOME/USERPROFILE was unset, so a service started without HOME could no longer find its working-directory or /etc/<app> config -- a regression against the hand-rolled lookups being migrated onto core, which just skipped the user location. Missing-home now only drops the user tier from the search lists; the canonical <Category>Dir() methods still report ErrNoHomeDirectory. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
72b656262d
commit
e8bf23a064
7 files changed
+220
-57
No files matched your search
@@ -59,6 +59,13 @@ write location) and, for Config/Data/executables,
|
||||
search, highest priority first). These are not always the same
|
||||
location -- see "Windows" below.
|
||||
|
||||
Without a home directory (`HOME`/`USERPROFILE` unset, and no override
|
||||
for the user tier), the search lists simply omit the user tier and still
|
||||
report the system tier -- a system service started without `HOME` keeps
|
||||
finding `/etc/<app>`. The canonical `<Category>Dir()` methods still
|
||||
return `paths.ErrNoHomeDirectory` in that case; a write location is never
|
||||
silently swapped for a different tier.
|
||||
|
||||
### Environment variable priority
|
||||
|
||||
Every canonical category is resolved through the same chain, highest
|
||||
|
||||
Reference in new issue
Block a user