diff options
author | Conrad Dean <conrad.p.dean@gmail.com> | 2019-04-13 22:03:06 -0400 |
---|---|---|
committer | Conrad Dean <conrad.p.dean@gmail.com> | 2019-04-13 22:03:06 -0400 |
commit | 38e1bf656b5352dbbc77cd2b4b163db52774b8bf (patch) | |
tree | 7d24f0f4da9a7ea64feaed7c7c8fcd7b901026f6 | |
parent | d41ee4aedb8265313d443d60e1f5b6b332cf28f7 (diff) |
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.
-rw-r--r-- | src/files.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<PathBuf>)> = RwLock::new((false, vec![])); } |