1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Merge pull request #9929 from 9999years/dont-print-values-in-magenta

Don't print the first bracket in values in magenta in error messages
This commit is contained in:
Théophane Hufschmitt 2024-02-08 10:56:18 +01:00 committed by GitHub
commit 46a0625a40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 131 additions and 114 deletions

View file

@ -511,4 +511,11 @@ std::ostream & operator<<(std::ostream & output, const ValuePrinter & printer)
return output;
}
template<>
hintformat & hintformat::operator%(const ValuePrinter & value)
{
fmt % value;
return *this;
}
}

View file

@ -9,6 +9,7 @@
#include <iostream>
#include "fmt.hh"
#include "print-options.hh"
namespace nix {
@ -78,4 +79,13 @@ public:
};
std::ostream & operator<<(std::ostream & output, const ValuePrinter & printer);
/**
* `ValuePrinter` does its own ANSI formatting, so we don't color it
* magenta.
*/
template<>
hintformat & hintformat::operator%(const ValuePrinter & value);
}