Skip files when detecting workspace members (#5735)

## Summary

Closes https://github.com/astral-sh/uv/issues/5724.
Closes https://github.com/astral-sh/uv/issues/5725.
This commit is contained in:
Charlie Marsh 2024-08-02 15:44:43 -04:00 committed by GitHub
parent 4096bcef3e
commit 097aa929b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -565,6 +565,14 @@ impl Workspace {
member_glob.to_string(), member_glob.to_string(),
)); ));
} }
// If the entry is _not_ a directory, skip it.
Err(_) if !member_root.is_dir() => {
warn!(
"Ignoring non-directory workspace member: `{}`",
member_root.simplified_display()
);
continue;
}
Err(err) => return Err(err.into()), Err(err) => return Err(err.into()),
}; };