From 3ec99affc8866be7d62ec201ce823b7ec1d73d82 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Wed, 8 Jul 2020 14:59:19 +0200 Subject: [PATCH] get_disks: don't fail on zfs_devices zfs does not have to be installed, so simply log an error and continue, users still get an error when clicking directly on ZFS Signed-off-by: Dominik Csapak --- src/tools/disks.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/tools/disks.rs b/src/tools/disks.rs index a4c3e295..73f83705 100644 --- a/src/tools/disks.rs +++ b/src/tools/disks.rs @@ -743,7 +743,10 @@ pub fn get_disks( let partition_type_map = get_partition_type_info()?; - let zfs_devices = zfs_devices(&partition_type_map, None)?; + let zfs_devices = zfs_devices(&partition_type_map, None).or_else(|err| -> Result, Error> { + eprintln!("error getting zfs devices: {}", err); + Ok(HashSet::new()) + })?; let lvm_devices = get_lvm_devices(&partition_type_map)?;