From 38e1bf656b5352dbbc77cd2b4b163db52774b8bf Mon Sep 17 00:00:00 2001 From: Conrad Dean Date: Sat, 13 Apr 2019 22:03:06 -0400 Subject: fix lscolors config if environment variable not set Per the lscolors crate docs, this switches from an `unwrap` to `unwrap_or_default` so that this does not panic when this environment variable is not set for the user, fixing a crash on startup in hunter. --- src/files.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files.rs b/src/files.rs index 0fd1ea2..14c718f 100644 --- a/src/files.rs +++ b/src/files.rs @@ -28,7 +28,7 @@ use crate::widget::Events; lazy_static! { - static ref COLORS: LsColors = LsColors::from_env().unwrap(); + static ref COLORS: LsColors = LsColors::from_env().unwrap_or_default(); static ref TAGS: RwLock<(bool, Vec)> = RwLock::new((false, vec![])); } -- cgit v1.2.3