From 69ed4a5a8d6e957412ccfa0b606eded6e9b24e58 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 14 Jul 2024 02:43:28 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20tui:=20refactor=20to=20use=20uti?= =?UTF-8?q?ls::exec=5Fchecked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tui.cpp b/src/tui.cpp index 8aa55fb..22d1156 100644 --- a/src/tui.cpp +++ b/src/tui.cpp @@ -1626,9 +1626,9 @@ void make_esp() noexcept { config_data["UEFI_PART"] = partition; // If it is already a fat/vfat partition... - const auto& ret_status = gucc::utils::exec(fmt::format(FMT_COMPILE("fsck -N {} | grep fat"), partition), true); bool do_boot_partition{}; - if (ret_status != "0"sv) { + const auto& is_fat_part = gucc::utils::exec_checked(fmt::format(FMT_COMPILE("fsck -N {} | grep -q fat"), partition)); + if (!is_fat_part) { const auto& content = fmt::format(FMT_COMPILE("\nThe UEFI partition {} has already been formatted.\n \nReformat? Doing so will erase ALL data already on that partition.\n"), partition); do_boot_partition = detail::yesno_widget(content, size(HEIGHT, LESS_THAN, 15) | size(WIDTH, LESS_THAN, 75)); }