mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Fix XDG_CONFIG_DIRS fallback
According to XDG Base Directory Specification, it should fall back to /etc/xdg when the env var is not present.
This commit is contained in:
parent
480c883f36
commit
e96faadcd6
2 changed files with 4 additions and 3 deletions
|
@ -562,7 +562,7 @@ Path getConfigDir()
|
|||
std::vector<Path> getConfigDirs()
|
||||
{
|
||||
Path configHome = getConfigDir();
|
||||
string configDirs = getEnv("XDG_CONFIG_DIRS").value_or("");
|
||||
string configDirs = getEnv("XDG_CONFIG_DIRS").value_or("/etc/xdg");
|
||||
std::vector<Path> result = tokenizeString<std::vector<string>>(configDirs, ":");
|
||||
result.insert(result.begin(), configHome);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue