Skip to content

Commit 187ccc8

Browse files
committed
Fixed #4.
1 parent 4a5470c commit 187ccc8

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/main.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,23 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
5757
));
5858
}
5959
let local_path = PathBuf::from(&args.sources[0]);
60-
let ignore_path = PathBuf::from(&args.ignore_file);
60+
let ignore_canonical = match PathBuf::from(&args.ignore_file).canonicalize() {
61+
Ok(p) => Some(p),
62+
Err(_) => {
63+
eprintln!(
64+
"Warning: Ignore file {:?} not found. Proceeding without it.",
65+
args.ignore_file
66+
);
67+
None
68+
}
69+
};
6170
println!("Processing local repository at: {:?}", local_path);
6271
println!("No file headers: {}", args.no_headers);
63-
println!("Ignore file path: {:?}", ignore_path.canonicalize()?);
6472
println!("----------------------------------------");
6573
process_local_path(
6674
local_path,
6775
args.no_headers,
68-
Some(args.ignore_file),
76+
ignore_canonical,
6977
args.folder,
7078
)
7179
.await

0 commit comments

Comments
 (0)