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:
parent
674a87462c
commit
7d168db83c
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue