From 3be287f3ef438d9272eb58b27b37bcefd8d8212b Mon Sep 17 00:00:00 2001 From: Nuke Date: Tue, 11 Jun 2024 09:09:18 -0600 Subject: [PATCH] fix: don't panic if ignore path not found #91 --- src/cli.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 8e18717..f3155f7 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -153,8 +153,11 @@ pub fn parse_args() -> Config { if opt.ignore_path.is_some() { opt.ignore_path.as_mut().unwrap().iter_mut().for_each(|p| { match fs::canonicalize(&p) { - Ok(p) => p, - Err(e) => panic!("Ignore path {:?} not found. {:?}.", p, e), + Ok(p) => &p, + Err(e) => { + println!("⚠ Warn: Ignore path {:?} not found. {:?}.", p, e); + &p + } }; }); }