From 658392e0299ecba9fd5a0bddf17aa62b1204de67 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 17 Feb 2025 11:36:47 +0100 Subject: [PATCH] getDefaultNixPath(): Don't add symlinks if the target doesn't exist (cherry picked from commit 8ac49ea5de0b763175af5b266dd258c544192036) --- src/libexpr/eval-settings.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc index 2846eccbc..a39f036a1 100644 --- a/src/libexpr/eval-settings.cc +++ b/src/libexpr/eval-settings.cc @@ -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 {