0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #243346 from emilazy/fix-nixos-option-null-dereference

nixos-option: fix expression position calculation
This commit is contained in:
Jörg Thalheim 2023-07-14 06:21:49 +01:00 committed by GitHub
commit d3e30b3c69
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,7 @@ Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy
Value evaluateValue(Context & ctx, Value & v)
{
ctx.state.forceValue(v, v.attrs->pos);
ctx.state.forceValue(v, [&]() { return v.determinePos(nix::noPos); });
if (ctx.autoArgs.empty()) {
return v;
}