diff --git a/Cargo.lock b/Cargo.lock index 8099f83..b431f06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -89,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "navi" -version = "2.0.10" +version = "2.0.11" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "raw_tty 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 7073aa4..5e3a649 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "navi" -version = "2.0.10" +version = "2.0.11" authors = ["Denis Isidoro "] edition = "2018" diff --git a/src/cheat.rs b/src/cheat.rs index 9aeafee..bad4c7b 100644 --- a/src/cheat.rs +++ b/src/cheat.rs @@ -140,7 +140,9 @@ pub fn read_all(config: &Config, stdin: &mut std::process::ChildStdin) -> HashMa let mut fallback: String = String::from(""); let folders_str = config.path.as_ref().unwrap_or_else(|| { - fallback = filesystem::pathbuf_to_string(filesystem::cheat_pathbuf().unwrap()); + if let Some(f) = filesystem::cheat_pathbuf() { + fallback = filesystem::pathbuf_to_string(f); + } &fallback }); let folders = folders_str.split(':');