File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
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 @@ -3070,8 +3070,11 @@ std::optional<SourcePath> EvalState::resolveLookupPathPath(const LookupPath::Pat
30703070 auto i = lookupPathResolved.find (value);
30713071 if (i != lookupPathResolved.end ()) return i->second ;
30723072
3073- auto finish = [&](SourcePath res) {
3074- debug (" resolved search path element '%s' to '%s'" , value, res);
3073+ auto finish = [&](std::optional<SourcePath> res) {
3074+ if (res)
3075+ debug (" resolved search path element '%s' to '%s'" , value, *res);
3076+ else
3077+ debug (" failed to resolve search path element '%s'" , value);
30753078 lookupPathResolved.emplace (value, res);
30763079 return res;
30773080 };
@@ -3123,8 +3126,7 @@ std::optional<SourcePath> EvalState::resolveLookupPathPath(const LookupPath::Pat
31233126 }
31243127 }
31253128
3126- debug (" failed to resolve search path element '%s'" , value);
3127- return std::nullopt ;
3129+ return finish (std::nullopt );
31283130}
31293131
31303132
You can’t perform that action at this time.
0 commit comments