diff --git a/src/functions/partition.rs b/src/functions/partition.rs index 5f47379..1769ec5 100755 --- a/src/functions/partition.rs +++ b/src/functions/partition.rs @@ -147,11 +147,11 @@ pub fn fmt_mount(mountpoint: &String, filesystem: &String, blockdevice: &String) } pub fn partition(device: PathBuf, mode: PartitionMode, efi: bool, partitions: Vec) { - if !device.exists() { - crash(format!("The device {device:?} doesn't exist"), 1); - } match mode { PartitionMode::Auto => { + if !device.exists() { + crash(format!("The device {device:?} doesn't exist"), 1); + } log::debug!("automatically partitioning {device:?}"); if efi { partition_with_efi(&device);