diff options
Diffstat (limited to 'third_party/nix/src/nix-env')
-rw-r--r-- | third_party/nix/src/nix-env/nix-env.cc | 5 | ||||
-rw-r--r-- | third_party/nix/src/nix-env/user-env.cc | 9 |
2 files changed, 8 insertions, 6 deletions
diff --git a/third_party/nix/src/nix-env/nix-env.cc b/third_party/nix/src/nix-env/nix-env.cc index a0fad3f3d102..396f65d0d6c7 100644 --- a/third_party/nix/src/nix-env/nix-env.cc +++ b/third_party/nix/src/nix-env/nix-env.cc @@ -23,6 +23,7 @@ #include "libstore/profiles.hh" #include "libstore/store-api.hh" #include "libutil/json.hh" +#include "libutil/status.hh" #include "libutil/util.hh" #include "libutil/xml-writer.hh" #include "nix-env/user-env.hh" @@ -720,8 +721,8 @@ static void opSet(Globals& globals, Strings opFlags, Strings opArgs) { if (globals.dryRun) { return; } - globals.state->store->buildPaths( - paths, globals.state->repair != 0u ? bmRepair : bmNormal); + nix::util::OkOrThrow(globals.state->store->buildPaths( + paths, globals.state->repair != 0u ? bmRepair : bmNormal)); } else { printMissing(globals.state->store, {drv.queryOutPath()}); if (globals.dryRun) { 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>(); |