1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31: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;
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 {