1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 17:41:48 +02:00

no blank line if no LOC

This commit is contained in:
Ben Burdette 2020-05-12 14:41:30 -06:00
parent 960d4362ed
commit ecbb8e9c0a
3 changed files with 4 additions and 2 deletions

View file

@ -182,7 +182,7 @@ std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
}
// lines of code.
if (einfo.nixCode.has_value()) {
if (einfo.nixCode.has_value() && einfo.nixCode->errLineOfCode.has_value()) {
printCodeLines(out, prefix, *einfo.nixCode);
out << prefix << std::endl;
}