about summary refs log tree commit diff
path: root/third_party/nix/src/nix-env/user-env.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-env/user-env.cc')
-rw-r--r--third_party/nix/src/nix-env/user-env.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/third_party/nix/src/nix-env/user-env.cc b/third_party/nix/src/nix-env/user-env.cc
index 06329e74f340..0cb921c8249d 100644
--- a/third_party/nix/src/nix-env/user-env.cc
+++ b/third_party/nix/src/nix-env/user-env.cc
@@ -9,6 +9,7 @@
 #include "libstore/globals.hh"
 #include "libstore/profiles.hh"
 #include "libstore/store-api.hh"
+#include "libutil/status.hh"
 #include "libutil/util.hh"
 
 namespace nix {
@@ -37,8 +38,8 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile,
   }
 
   DLOG(INFO) << "building user environment dependencies";
-  state.store->buildPaths(drvsToBuild,
-                          state.repair != 0u ? bmRepair : bmNormal);
+  util::OkOrThrow(state.store->buildPaths(
+      drvsToBuild, state.repair != 0u ? bmRepair : bmNormal));
 
   /* Construct the whole top level derivation. */
   PathSet references;
@@ -137,8 +138,8 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile,
 
   /* Realise the resulting store expression. */
   DLOG(INFO) << "building user environment";
-  state.store->buildPaths({topLevelDrv},
-                          state.repair != 0u ? bmRepair : bmNormal);
+  util::OkOrThrow(state.store->buildPaths(
+      {topLevelDrv}, state.repair != 0u ? bmRepair : bmNormal));
 
   /* Switch the current user environment to the output path. */
   auto store2 = state.store.dynamic_pointer_cast<LocalFSStore>();