From 9aae7a7b9a6d7d3c67827bda3b8ac1e57f0f48dd Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Mar 2011 12:56:27 +0100 Subject: save "exitcode 0" messages in event_log for "silent" actions; tweak .xml a bit Signed-off-by: Denys Vlasenko --- src/gui-wizard-gtk/wizard.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/gui-wizard-gtk/wizard.c') diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c index f114f8ed..07ebcb5b 100644 --- a/src/gui-wizard-gtk/wizard.c +++ b/src/gui-wizard-gtk/wizard.c @@ -770,9 +770,11 @@ static gboolean consume_cmd_output(GIOChannel *source, GIOCondition condition, g /* Write a final message to the log */ if (evd->event_log->len != 0 && evd->event_log->buf[evd->event_log->len - 1] != '\n') save_to_event_log(evd, "\n"); - if (retval != 0) + /* If program failed, or if it finished successfully without saying anything... */ + if (retval != 0 || evd->event_log_state == LOGSTATE_FIRSTLINE) { - evd->event_log_state = LOGSTATE_ERRLINE; + if (retval != 0) /* If program failed, emit error line */ + evd->event_log_state = LOGSTATE_ERRLINE; char *msg; if (WIFSIGNALED(status)) msg = xasprintf("(killed by signal %d)\n", WTERMSIG(status)); -- cgit