mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
watch: Use stdout rather than stderr to display output
Previously, the header was printed to stderr. This matches the behavior of watch on Linux.
This commit is contained in:
parent
2f3c41e033
commit
ba1c4bc1d1
1 changed files with 6 additions and 6 deletions
|
@ -132,19 +132,19 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto watch_callback = [&] {
|
||||
// Clear the screen, then reset the cursor position to the top left.
|
||||
warn("\033[H\033[2J");
|
||||
out("\033[H\033[2J");
|
||||
// Print the header.
|
||||
if (!flag_noheader) {
|
||||
warnln("{}", header);
|
||||
warnln();
|
||||
outln("{}", header);
|
||||
outln();
|
||||
} else {
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
}
|
||||
if (run_command(command) != 0) {
|
||||
exit_code = 1;
|
||||
if (flag_beep_on_fail) {
|
||||
warnln("\a");
|
||||
fflush(stderr);
|
||||
out("\a");
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue