no blank line if no LOC
This commit is contained in:
parent
960d4362ed
commit
ecbb8e9c0a
3
Makefile
3
Makefile
|
@ -17,7 +17,8 @@ makefiles = \
|
|||
misc/upstart/local.mk \
|
||||
doc/manual/local.mk \
|
||||
tests/local.mk \
|
||||
tests/plugins/local.mk
|
||||
tests/plugins/local.mk \
|
||||
src/error-demo/local.mk
|
||||
|
||||
-include Makefile.config
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "logging.hh"
|
||||
#include "nixexpr.hh"
|
||||
#include "util.hh"
|
||||
|
||||
#include <iostream>
|
||||
#include <optional>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue