mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 14:32:22 +08:00
🧹 misc: refactor to use utils::exec_checked
This commit is contained in:
parent
69ed4a5a8d
commit
1888d5a45d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user