diff --git a/src/nix/home.cc b/src/nix/home.cc index c3b847b1a..35feb36e0 100644 --- a/src/nix/home.cc +++ b/src/nix/home.cc @@ -1,6 +1,8 @@ #include "command.hh" #include "activatables.hh" #include "progress-bar.hh" +#include "users.hh" +#include "current-process.hh" using namespace nix; diff --git a/src/nix/run.cc b/src/nix/run.cc index 5db75548e..2ef6530f5 100644 --- a/src/nix/run.cc +++ b/src/nix/run.cc @@ -151,7 +151,7 @@ struct CmdShell : InstallablesCommand, MixEnvironment auto pathString = store->printStorePath(path); for (auto const& pathV : pathVarMapping) { - if (accessor->stat(pathString + pathV.second).type != FSAccessor::tMissing) + if (auto st = accessor->maybeLstat(CanonPath(pathString + pathV.second)); st) pathVars[pathV.first].push_front(pathString + pathV.second); } diff --git a/src/nix/system.cc b/src/nix/system.cc index 7bbaff8fa..000fa2dea 100644 --- a/src/nix/system.cc +++ b/src/nix/system.cc @@ -1,6 +1,7 @@ #include "command.hh" #include "activatables.hh" #include "progress-bar.hh" +#include "current-process.hh" using namespace nix;