From 5d4161ea25080b3cb95e159f4895be8bccf52a61 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 22 Nov 2023 22:09:52 +0100 Subject: [PATCH] fix build --- src/nix/home.cc | 2 ++ src/nix/run.cc | 2 +- src/nix/system.cc | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) 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;