Skip to content

Commit 75a2b41

Browse files
committed
🚧 disk: fix regression for headless
shoudln't show TUI's "mount successful" message on simple_tui as it's invalid for headless install by-pass quite arg to esp partition selection
1 parent b8c26c6 commit 75a2b41

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/disk.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ auto apply_swap_selection(const SwapSelection& swap, std::vector<gucc::fs::Parti
455455
return true;
456456
}
457457

458-
auto apply_esp_selection(const EspSelection& esp, std::vector<gucc::fs::Partition>& partitions) noexcept -> bool {
458+
auto apply_esp_selection(const EspSelection& esp, std::vector<gucc::fs::Partition>& partitions, bool quiet) noexcept -> bool {
459459
if (esp.device.empty()) {
460460
return false;
461461
}
@@ -474,7 +474,7 @@ auto apply_esp_selection(const EspSelection& esp, std::vector<gucc::fs::Partitio
474474

475475
const auto& mountpoint_info = utils::get_mountpoint();
476476
const auto& part_mountpoint = fmt::format(FMT_COMPILE("{}{}"), mountpoint_info, esp.mountpoint);
477-
tui::confirm_mount(part_mountpoint);
477+
tui::confirm_mount(part_mountpoint, quiet);
478478

479479
// insert boot partition
480480
partitions.emplace_back(std::move(*esp_partition));

‎src/disk.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ auto select_btrfs_subvolumes(std::string_view root_mountpoint) noexcept -> std::
7676
[[nodiscard]] auto apply_swap_selection(const SwapSelection& swap, std::vector<gucc::fs::Partition>& partitions) noexcept -> bool;
7777

7878
// Handles creation of ESP/boot partition
79-
[[nodiscard]] auto apply_esp_selection(const EspSelection& esp, std::vector<gucc::fs::Partition>& partitions) noexcept -> bool;
79+
[[nodiscard]] auto apply_esp_selection(const EspSelection& esp, std::vector<gucc::fs::Partition>& partitions, bool quiet = false) noexcept -> bool;
8080

8181
// Handles partitioning of the root
8282
[[nodiscard]] auto apply_root_partition_actions(const RootPartitionSelection& selection, const std::vector<gucc::fs::BtrfsSubvolume>& btrfs_subvols, std::vector<gucc::fs::Partition>& partition_schema) noexcept -> bool;

‎src/simple_tui.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ void make_esp(std::vector<gucc::fs::Partition>& partitions, std::string_view par
175175
.mountpoint = std::string{uefi_mount},
176176
.format_requested = do_format,
177177
};
178-
if (!utils::apply_esp_selection(esp_selection, partitions)) {
178+
if (!utils::apply_esp_selection(esp_selection, partitions, true)) {
179179
spdlog::error("Failed to apply ESP actions");
180180
return;
181181
}

0 commit comments

Comments
 (0)