Skip to content

Commit

Permalink
Make EFI stub not fail entire install, import NO_COLOR when calling…
Browse files Browse the repository at this point in the history
… subprocess
  • Loading branch information
korewaChino committed Jan 24, 2025
1 parent f373834 commit 914b0ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/backend/postinstall/efi_stub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,14 @@ impl PostInstallModule for EfiStub {
.status()?;

if !status.success() {
bail!("Failed to create EFI boot entry");
// We should be able to fail silently here, as the user may still be able to find the OS as long
// as the firmware finds the bootloader binary

tracing::error!("Failed to create EFI boot entry");

tracing::warn!("EFI boot entry creation failed, You may not be able to find the installed OS in the boot menu");

// todo: Implement a popup to warn the user, since this is not a critical error but should be noted
}

Ok(())
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ fn initialize_custom_icons(display: &gtk::gdk::Display) {
#[allow(clippy::cognitive_complexity)]
fn setup_hooks() -> impl std::any::Any {
for arg in std::env::args() {
if arg.starts_with("READYMADE_") || arg.starts_with("REPART_COPY_SOURCE") {
if arg.starts_with("READYMADE_") || arg.starts_with("REPART_COPY_SOURCE") || arg.starts_with("NO_COLOR") {
let (key, value) = arg.split_once('=').unwrap();
println!("Setting env var {key} to {value}");
std::env::set_var(key, value);
Expand Down

0 comments on commit 914b0ce

Please sign in to comment.