Compare commits
No commits in common. "b3946f9131bc518ba0bd24dff02e4ded34737ee7" and "11df0f41fac90c0ee128afed235e0c9ecb71b6ba" have entirely different histories.
b3946f9131
...
11df0f41fa
24
src/main.rs
24
src/main.rs
|
@ -29,21 +29,21 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
#[cfg(not(windows))]
|
||||||
let boot_folder = unsafe {
|
let boot_folder = args
|
||||||
args.boot_directory
|
.boot_directory
|
||||||
.or_else(|| PathBuf::from_str(BOOT_PATH).ok())
|
.or_else(|| PathBuf::from_str(BOOT_PATH).ok());
|
||||||
.unwrap_unchecked()
|
|
||||||
};
|
#[cfg(not(windows))]
|
||||||
|
let boot_folder = unsafe { boot_folder.unwrap_unchecked() };
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let boot_folder = {
|
if args.boot_directory.is_none() {
|
||||||
if args.boot_directory.is_none() {
|
eprintln!("You must supply a boot-directory on windows; see --help");
|
||||||
eprintln!("You must supply a boot-directory on windows; see --help");
|
exit(1);
|
||||||
exit(1);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
unsafe { args.boot_directory.unwrap_unchecked() }
|
#[cfg(windows)]
|
||||||
};
|
let boot_folder = unsafe { args.boot_directory.unwrap_unchecked() };
|
||||||
|
|
||||||
let grub_env = boot_folder.join("grub/grubenv");
|
let grub_env = boot_folder.join("grub/grubenv");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue