mirror of
https://github.com/lsd-rs/lsd
synced 2024-12-13 21:52:37 +00:00
Print errors to stderr
This commit is contained in:
parent
f619dc07d6
commit
79416127c8
2 changed files with 4 additions and 4 deletions
|
@ -70,7 +70,7 @@ impl Core {
|
|||
let absolute_path = match fs::canonicalize(&path) {
|
||||
Ok(path) => path,
|
||||
Err(err) => {
|
||||
println!("couldn't access '{}': {}", path.display(), err);
|
||||
eprintln!("cannot access '{}': {}", path.display(), err);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
@ -81,7 +81,7 @@ impl Core {
|
|||
self.flags.display,
|
||||
) {
|
||||
Ok(meta) => meta_list.push(meta),
|
||||
Err(err) => println!("cannot access '{}': {}", path.display(), err),
|
||||
Err(err) => eprintln!("cannot access '{}': {}", path.display(), err),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ impl Meta {
|
|||
}
|
||||
|
||||
if let Err(err) = meta.path.read_dir() {
|
||||
println!("cannot access '{}': {}", path.display(), err);
|
||||
eprintln!("cannot access '{}': {}", path.display(), err);
|
||||
return Ok(meta);
|
||||
}
|
||||
let mut content = Vec::new();
|
||||
|
@ -99,7 +99,7 @@ impl Meta {
|
|||
match Self::from_path_recursive(&path.to_path_buf(), depth - 1, display) {
|
||||
Ok(res) => res,
|
||||
Err(err) => {
|
||||
println!("cannot access '{}': {}", path.display(), err);
|
||||
eprintln!("cannot access '{}': {}", path.display(), err);
|
||||
continue;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue