forked from lix-project/lix
Merge pull request #6489 from alexshpilkin/fix-6488
nix: Add forgotten null check in AttrCursor::getListOfStrings()
This commit is contained in:
commit
f4102de84b
|
@ -648,6 +648,7 @@ std::vector<std::string> AttrCursor::getListOfStrings()
|
|||
for (auto & elem : v.listItems())
|
||||
res.push_back(std::string(root->state.forceStringNoCtx(*elem)));
|
||||
|
||||
if (root->db)
|
||||
cachedValue = {root->db->setListOfStrings(getKey(), res), res};
|
||||
|
||||
return res;
|
||||
|
|
|
@ -56,6 +56,13 @@ nix build -f multiple-outputs.nix --json 'e^*' --no-link | jq --exit-status '
|
|||
(.outputs | keys == ["a", "b", "c"]))
|
||||
'
|
||||
|
||||
# Make sure that `--impure` works (regression test for https://github.com/NixOS/nix/issues/6488)
|
||||
nix build --impure -f multiple-outputs.nix --json e --no-link | jq --exit-status '
|
||||
(.[0] |
|
||||
(.drvPath | match(".*multiple-outputs-e.drv")) and
|
||||
(.outputs | keys == ["a", "b"]))
|
||||
'
|
||||
|
||||
testNormalization () {
|
||||
clearStore
|
||||
outPath=$(nix-build ./simple.nix --no-out-link)
|
||||
|
|
Loading…
Reference in a new issue