fix(script): do not hide failing scripts with constant output

This commit is contained in:
indev
2022-04-02 01:15:35 +07:00
committed by Patrick Ziegler
parent ff6ac9fefc
commit 36d19d372d
2 changed files with 3 additions and 7 deletions

View File

@ -106,8 +106,6 @@ script_runner::interval script_runner::run() {
int fd = cmd.get_stdout(PIPE_READ);
assert(fd != -1);
bool changed = false;
bool got_output = false;
while (!m_stopping && cmd.is_running() && !io_util::poll(fd, POLLHUP, 0)) {
/**
@ -115,7 +113,7 @@ script_runner::interval script_runner::run() {
* down, we still need to continue polling.
*/
if (io_util::poll_read(fd, 25) && !got_output) {
changed = set_output(cmd.readline());
set_output(cmd.readline());
got_output = true;
}
}
@ -127,10 +125,6 @@ script_runner::interval script_runner::run() {
m_exit_status = cmd.wait();
if (!changed && m_exit_status != 0) {
clear_output();
}
if (m_exit_status == 0) {
return m_interval_success;
} else {