Avoid calling style_Set/Reset before strerror(errno),

since they may call `isatty` which can change `errno`

Fixes #1857
This commit is contained in:
Rangi
2025-11-08 12:06:16 -05:00
parent 395b03e88e
commit 04e3a904c2
3 changed files with 16 additions and 6 deletions
+9
View File
@@ -24,6 +24,15 @@ void incrementVerbosity() {
}
}
void printVerbosely(char const *fmt, ...) {
va_list args;
style_Set(stderr, STYLE_MAGENTA, false);
va_start(args, fmt);
vfprintf(stderr, fmt, args);
va_end(args);
style_Reset(stderr);
}
void printVVVVVVerbosity() {
if (!checkVerbosity(VERB_VVVVVV)) {
return;