diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-09-22 21:53:01 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-09-22 21:53:01 +0200 |
commit | 382aa05ff71b61379f5c2792eaf517bdf4a5c5bf (patch) | |
tree | 09e72863748c61f313b26c0ef64157442dbc6a9a /src/nix/installables.cc | |
parent | 893be6f5e36abb58bbaa9c49055a5218114dd514 (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.cc | 7 |
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 |