Improve cli error message on invalid glob
This commit is contained in:
parent
9d460e6d01
commit
7421836ee4
1 changed files with 3 additions and 1 deletions
|
|
@ -339,7 +339,9 @@ fn collect_paths<'a>(paths: impl Iterator<Item = &'a str>) -> error::Result<Vec<
|
|||
if Path::new(path).exists() {
|
||||
incorporate_path(path, positive);
|
||||
} else {
|
||||
for path in glob(path)? {
|
||||
let paths =
|
||||
glob(path).map_err(Error::wrap(|| format!("Invalid glob pattern {:?}", path)))?;
|
||||
for path in paths {
|
||||
if let Some(path) = path?.to_str() {
|
||||
incorporate_path(path, positive);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue