From 36834a02796c1d0211fee1430bcca3ee9cb10c13 Mon Sep 17 00:00:00 2001 From: ngn Date: Sun, 25 Aug 2024 22:47:04 +0300 Subject: [PATCH] fix: prevent displaying the install bar while running the install script --- locale/tr/LC_MESSAGES/matt.po | 6 +++--- src/callback.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/locale/tr/LC_MESSAGES/matt.po b/locale/tr/LC_MESSAGES/matt.po index 6dfcc29..f4e688b 100644 --- a/locale/tr/LC_MESSAGES/matt.po +++ b/locale/tr/LC_MESSAGES/matt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-22 08:37+0300\n" +"POT-Creation-Date: 2024-08-25 22:43+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,11 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/callback.c:36 src/callback.c:53 +#: src/callback.c:39 src/callback.c:56 msgid "Failed to sync " msgstr "Failed to sync " -#: src/callback.c:47 src/cmd/sync.c:46 +#: src/callback.c:50 src/cmd/sync.c:46 msgid "Synced " msgstr "Synced " diff --git a/src/callback.c b/src/callback.c index 9b2048a..76a09b2 100644 --- a/src/callback.c +++ b/src/callback.c @@ -3,7 +3,10 @@ #include "log.h" bool callback_install(lm_ctx_t *ctx, lm_pkg_t *pkg, char *file, size_t current, size_t total, void *data) { - bar(current, total); + if (current < total) + bar(current, total); + else + bar_free(); return true; }