Skip to content

Commit

Permalink
Merge pull request #10309 from NixOS/backport-10293-to-2.21-maintenance
Browse files Browse the repository at this point in the history
[Backport 2.21-maintenance] EvalCache: Fix missing format string argument
  • Loading branch information
roberth authored Mar 24, 2024
2 parents 057ffc2 + 9e35746 commit 53440f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libexpr/eval-cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ std::string AttrCursor::getString()
auto & v = forceValue();

if (v.type() != nString && v.type() != nPath)
root->state.error<TypeError>("'%s' is not a string but %s", getAttrPathStr()).debugThrow();
root->state.error<TypeError>("'%s' is not a string but %s", getAttrPathStr(), showType(v)).debugThrow();

return v.type() == nString ? v.c_str() : v.path().to_string();
}
Expand Down Expand Up @@ -630,7 +630,7 @@ string_t AttrCursor::getStringWithContext()
else if (v.type() == nPath)
return {v.path().to_string(), {}};
else
root->state.error<TypeError>("'%s' is not a string but %s", getAttrPathStr()).debugThrow();
root->state.error<TypeError>("'%s' is not a string but %s", getAttrPathStr(), showType(v)).debugThrow();
}

bool AttrCursor::getBool()
Expand Down

0 comments on commit 53440f4

Please sign in to comment.