mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 01:40:34 +01:00
Allow for missing directories
This commit is contained in:
parent
ca2ef7ba82
commit
c5a311d3cc
1 changed files with 8 additions and 1 deletions
|
@ -22,6 +22,7 @@ use globset::GlobBuilder;
|
|||
use lscolors::LsColors;
|
||||
use regex::bytes::{RegexBuilder, RegexSetBuilder};
|
||||
|
||||
use crate::error::print_error;
|
||||
use crate::exec::CommandTemplate;
|
||||
use crate::exit_codes::ExitCode;
|
||||
use crate::filetypes::FileTypes;
|
||||
|
@ -90,7 +91,13 @@ fn run() -> Result<ExitCode> {
|
|||
))
|
||||
}
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?,
|
||||
.inspect(|res| {
|
||||
if let Err(e) = res {
|
||||
print_error(format!("{}", e))
|
||||
}
|
||||
})
|
||||
.filter_map(Result::ok)
|
||||
.collect::<Vec<_>>(),
|
||||
None => vec![current_directory.to_path_buf()],
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue