aboutsummaryrefslogtreecommitdiff
path: root/src/nix/installables.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-22 21:53:01 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-22 21:53:01 +0200
commit382aa05ff71b61379f5c2792eaf517bdf4a5c5bf (patch)
tree09e72863748c61f313b26c0ef64157442dbc6a9a /src/nix/installables.cc
parent893be6f5e36abb58bbaa9c49055a5218114dd514 (diff)
nix flake info --json: Get rid of duplicate getFlake() call
Also fix some gcc warnings.
Diffstat (limited to 'src/nix/installables.cc')
-rw-r--r--src/nix/installables.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 85005cc95..867133653 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -291,11 +291,12 @@ struct InstallableFlake : InstallableValue
makeFlakeClosureGCRoot(*state.store, flakeRef, resFlake);
- auto vOutputs = (*vFlake->attrs->get(state.symbols.create("outputs")))->value;
+ auto aOutputs = vFlake->attrs->get(state.symbols.create("outputs"));
+ assert(aOutputs);
- state.forceValue(*vOutputs);
+ state.forceValue(*(*aOutputs)->value);
- return vOutputs;
+ return (*aOutputs)->value;
}
std::vector<flake::EvalCache::Derivation> toDerivations() override