Check for no valid search paths to prevent panic
@@ -96,6 +96,11 @@ fn run() -> Result<ExitCode> {
}
}
+ // Check if we have no valid search paths.
+ if dir_vec.is_empty() {
+ anyhow!("No valid search paths given.");
+ }
+
if matches.is_present("absolute-path") {
dir_vec = dir_vec
.iter()
