1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-29 06:21:14 +02:00

getDefaultNixPath(): Don't add symlinks if the target doesn't exist

This commit is contained in:
Eelco Dolstra 2025-02-17 11:36:47 +01:00
parent f0dbfada38
commit 8ac49ea5de

View file

@ -57,7 +57,7 @@ Strings EvalSettings::getDefaultNixPath()
{ {
Strings res; Strings res;
auto add = [&](const Path & p, const std::string & s = std::string()) { auto add = [&](const Path & p, const std::string & s = std::string()) {
if (pathAccessible(p)) { if (std::filesystem::exists(p)) {
if (s.empty()) { if (s.empty()) {
res.push_back(p); res.push_back(p);
} else { } else {