diff options
author | Guillaume Maudoux <guillaume.maudoux@tweag.io> | 2022-09-07 00:34:03 +0200 |
---|---|---|
committer | Guillaume Maudoux <guillaume.maudoux@tweag.io> | 2022-09-07 00:34:03 +0200 |
commit | eb460a9529dd79995b6b788d59322fbc8f989214 (patch) | |
tree | 2dec54ef6b3096d787cb49cb0f2f6b7041b1f6c1 /src/nix-env | |
parent | 9ff892aad4ee13532ea84cb6e4a2a53d70945efe (diff) | |
parent | 96001098796c9011d1670cc8a7acd00ef49b2d7a (diff) |
WIP: broken merge but need a git checkpoint
Diffstat (limited to 'src/nix-env')
-rw-r--r-- | src/nix-env/nix-env.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/nix-env/nix-env.cc b/src/nix-env/nix-env.cc index 96f3c3b26..fdd66220a 100644 --- a/src/nix-env/nix-env.cc +++ b/src/nix-env/nix-env.cc @@ -940,12 +940,12 @@ static void queryJSON(Globals & globals, std::vector<DrvInfo> & elems, bool prin JSONObject metaObj = pkgObj.object("meta"); StringSet metaNames = i.queryMetaNames(); for (auto & j : metaNames) { - auto placeholder = metaObj.placeholder(j); Value * v = i.queryMeta(j); if (!v) { printError("derivation '%s' has invalid meta attribute '%s'", i.queryName(), j); - placeholder.write(nullptr); + metaObj.attr(j, nullptr); } else { + auto placeholder = metaObj.placeholder(j); PathSet context; printValueAsJSON(*globals.state, true, *v, noPos, placeholder, context); } @@ -1485,12 +1485,10 @@ static int main_nix_env(int argc, char * * argv) if (globals.profile == "") globals.profile = getDefaultProfile(); - op(globals, opFlags, opArgs); + op(globals, std::move(opFlags), std::move(opArgs)); globals.state->printStats(); - logger->stop(); - return 0; } } |