From 1888d5a45dcf334d0b9ec23785ecad4bdef2ad87 Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Sun, 14 Jul 2024 02:43:47 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20misc:=20refactor=20to=20use=20ut?= =?UTF-8?q?ils::exec=5Fchecked?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 9fe844c..96847b6 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -77,8 +77,8 @@ namespace tui { // Revised to deal with partition sizes now being displayed to the user bool confirm_mount([[maybe_unused]] const std::string_view& part_user, bool quite) { #ifdef NDEVENV - const auto& ret_status = gucc::utils::exec(fmt::format(FMT_COMPILE("mount | grep -q {}"), part_user), true); - if (!quite && (ret_status != "0"sv)) { + const auto& is_mounted = gucc::utils::exec_checked(fmt::format(FMT_COMPILE("mount | grep -q {}"), part_user)); + if (!quite && !is_mounted) { detail::infobox_widget("\nMount Failed!\n"sv); std::this_thread::sleep_for(std::chrono::seconds(2)); return false;