Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Commit

Permalink
refactor: use slice to save grub install argument
Browse files Browse the repository at this point in the history
  • Loading branch information
eatradish committed Sep 20, 2023
1 parent 52791ff commit 9aa3de4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -560,10 +560,10 @@ pub fn execute_grub_install(mbr_dev: Option<&PathBuf>) -> Result<()> {
);
} else {
let (target, is_efi) = match network::get_arch_name() {
Some("amd64") => (vec!["--target=x86_64-efi"], true),
Some("arm64") => (vec!["--target=arm64-efi", "--removable"], true),
Some("riscv64") => (vec!["--target=riscv64-efi", "--removable"], true),
Some("loongarch64") => (vec!["--target=loongarch64-efi"], true),
Some("amd64") => (&["--target=x86_64-efi"][..], true),
Some("arm64") => (&["--target=arm64-efi", "--removable"][..], true),
Some("riscv64") => (&["--target=riscv64-efi", "--removable"][..], true),
Some("loongarch64") => (&["--target=loongarch64-efi"][..], true),
Some(arch) => {
info!("This architecture {arch} does not support grub");
return Ok(());
Expand Down

0 comments on commit 9aa3de4

Please sign in to comment.