1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

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

(cherry picked from commit 8ac49ea5de)
This commit is contained in:
Eelco Dolstra 2025-02-17 11:36:47 +01:00 committed by Mergify
parent d3a52c2ef4
commit 658392e029

View file

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