From 2aff6efe677b1c1ff42677d9c8a7679373fb9712 Mon Sep 17 00:00:00 2001 From: Adrian Vovk Date: Fri, 30 Aug 2024 21:53:14 -0400 Subject: [PATCH] updatectl: Ensure we clear the progress bar Otherwise we end up half-overwriting the progress bar, which looks buggy --- src/sysupdate/updatectl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sysupdate/updatectl.c b/src/sysupdate/updatectl.c index d5f74bff3ef..8f1e4e72db8 100644 --- a/src/sysupdate/updatectl.c +++ b/src/sysupdate/updatectl.c @@ -808,12 +808,15 @@ static int update_render_progress(sd_event_source *source, void *userdata) { int progress = PTR_TO_INT(p); if (progress == UPDATE_PROGRESS_FAILED) { + clear_progress_bar(target); fprintf(stderr, "%s %s\n", RED_CROSS_MARK(), target); total += 100; } else if (progress == -EALREADY) { + clear_progress_bar(target); fprintf(stderr, "%s %s (Already up-to-date)\n", GREEN_CHECK_MARK(), target); n--; /* Don't consider this target in the total */ } else if (progress < 0) { + clear_progress_bar(target); fprintf(stderr, "%s %s (%s)\n", RED_CROSS_MARK(), target, STRERROR(progress)); total += 100; } else { -- 2.47.3