From 616299ece4f77e59e7a5c1631abedc2fa03e709c Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 14 Jul 2024 02:45:36 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20simple=5Ftui:=20refactor=20to=20?= =?UTF-8?q?use=20utils::exec=5Fchecked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/simple_tui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simple_tui.cpp b/src/simple_tui.cpp index b79764c..284fe62 100644 --- a/src/simple_tui.cpp +++ b/src/simple_tui.cpp @@ -131,8 +131,8 @@ void make_esp(const std::string& part_name, std::string_view bootloader_name, bo 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 &>/dev/null"), partition), true); - if (ret_status != "0" && reformat_part) { + const auto& is_fat_part = gucc::utils::exec_checked(fmt::format(FMT_COMPILE("fsck -N {} | grep -q fat"), partition)); + if (!is_fat_part && reformat_part) { #ifdef NDEVENV gucc::utils::exec(fmt::format(FMT_COMPILE("mkfs.vfat -F32 {} &>/dev/null"), partition)); #endif