1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Respect terminal width printing error messages

This commit is contained in:
Eelco Dolstra 2020-06-15 18:18:02 +02:00
parent f20bb983ca
commit 8b099812ea

View file

@ -105,7 +105,7 @@ void printCodeLines(std::ostream &out, const string &prefix, const NixCode &nixC
std::ostream& operator<<(std::ostream &out, const ErrorInfo &einfo)
{
size_t errwidth = 80;
auto errwidth = std::max<size_t>(getWindowSize().second, 20);
string prefix = "";
string levelString;