fix build

This commit is contained in:
Max Headroom 2023-11-22 22:09:52 +01:00
parent 1314205843
commit 5d4161ea25
3 changed files with 4 additions and 1 deletions

View file

@ -1,6 +1,8 @@
#include "command.hh" #include "command.hh"
#include "activatables.hh" #include "activatables.hh"
#include "progress-bar.hh" #include "progress-bar.hh"
#include "users.hh"
#include "current-process.hh"
using namespace nix; using namespace nix;

View file

@ -151,7 +151,7 @@ struct CmdShell : InstallablesCommand, MixEnvironment
auto pathString = store->printStorePath(path); auto pathString = store->printStorePath(path);
for (auto const& pathV : pathVarMapping) { 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); pathVars[pathV.first].push_front(pathString + pathV.second);
} }

View file

@ -1,6 +1,7 @@
#include "command.hh" #include "command.hh"
#include "activatables.hh" #include "activatables.hh"
#include "progress-bar.hh" #include "progress-bar.hh"
#include "current-process.hh"
using namespace nix; using namespace nix;