Send errors to stdout in control mode so they don't get reordered with

other output, reported by George Nachman in GitHub issue 2048.
pull/2051/head
nicm 2020-01-05 12:51:43 +00:00
parent 1870cc70ef
commit 7c6c66cc3c
1 changed files with 4 additions and 1 deletions

View File

@ -551,7 +551,10 @@ cmdq_error(struct cmdq_item *item, const char *fmt, ...)
msg = utf8_sanitize(tmp);
free(tmp);
}
file_error(c, "%s\n", msg);
if (c->flags & CLIENT_CONTROL)
file_print(c, "%s\n", msg);
else
file_error(c, "%s\n", msg);
c->retval = 1;
} else {
*msg = toupper((u_char) *msg);