File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ Strings EvalSettings::getDefaultNixPath()
5757{
5858 Strings res;
5959 auto add = [&](const Path & p, const std::string & s = std::string ()) {
60- if (pathAccessible (p)) {
60+ if (std::filesystem::exists (p)) {
6161 if (s.empty ()) {
6262 res.push_back (p);
6363 } else {
Original file line number Diff line number Diff line change @@ -3084,8 +3084,11 @@ std::optional<std::string> EvalState::resolveLookupPathPath(const LookupPath::Pa
30843084 auto i = lookupPathResolved.find (value);
30853085 if (i != lookupPathResolved.end ()) return i->second ;
30863086
3087- auto finish = [&](std::string res) {
3088- debug (" resolved search path element '%s' to '%s'" , value, res);
3087+ auto finish = [&](std::optional<std::string> res) {
3088+ if (res)
3089+ debug (" resolved search path element '%s' to '%s'" , value, *res);
3090+ else
3091+ debug (" failed to resolve search path element '%s'" , value);
30893092 lookupPathResolved.emplace (value, res);
30903093 return res;
30913094 };
@@ -3137,9 +3140,7 @@ std::optional<std::string> EvalState::resolveLookupPathPath(const LookupPath::Pa
31373140 }
31383141 }
31393142
3140- debug (" failed to resolve search path element '%s'" , value);
3141- return std::nullopt ;
3142-
3143+ return finish (std::nullopt );
31433144}
31443145
31453146
You can’t perform that action at this time.
0 commit comments