mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Discard fragments when parsing unnamed URLs (#3940)
## Summary Closes https://github.com/astral-sh/uv/issues/3934.
This commit is contained in:
parent
72b1642232
commit
8c11f99fdf
5 changed files with 67 additions and 6 deletions
|
@ -59,8 +59,8 @@ impl UnnamedRequirementUrl for VerbatimParsedUrl {
|
|||
) -> Result<Self, Self::Err> {
|
||||
let verbatim = VerbatimUrl::parse_path(&path, &working_dir)?;
|
||||
let parsed_path_url = ParsedPathUrl {
|
||||
path: verbatim.as_path()?,
|
||||
url: verbatim.to_url(),
|
||||
path: working_dir.as_ref().join(path),
|
||||
editable: false,
|
||||
};
|
||||
Ok(Self {
|
||||
|
@ -72,8 +72,8 @@ impl UnnamedRequirementUrl for VerbatimParsedUrl {
|
|||
fn parse_absolute_path(path: impl AsRef<Path>) -> Result<Self, Self::Err> {
|
||||
let verbatim = VerbatimUrl::parse_absolute_path(&path)?;
|
||||
let parsed_path_url = ParsedPathUrl {
|
||||
path: verbatim.as_path()?,
|
||||
url: verbatim.to_url(),
|
||||
path: path.as_ref().to_path_buf(),
|
||||
editable: false,
|
||||
};
|
||||
Ok(Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue