mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-01 14:31:12 +00:00
Solves: https://github.com/astral-sh/uv/pull/1746#discussion_r1496139629
This commit is contained in:
parent
ede2828fde
commit
a269766c27
1 changed files with 11 additions and 10 deletions
|
@ -983,8 +983,8 @@ fn parse(cursor: &mut Cursor, working_dir: Option<&Path>) -> Result<Requirement,
|
||||||
cursor.eat_whitespace();
|
cursor.eat_whitespace();
|
||||||
if let Some((pos, char)) = cursor.next() {
|
if let Some((pos, char)) = cursor.next() {
|
||||||
if let Some(VersionOrUrl::Url(url)) = requirement_kind {
|
if let Some(VersionOrUrl::Url(url)) = requirement_kind {
|
||||||
// Unwrap safety: The `VerbatimUrl` we just parsed has a string source.
|
if let Some(given) = url.given() {
|
||||||
if url.given().unwrap().ends_with(';') && marker.is_none() {
|
if given.ends_with(';') && marker.is_none() {
|
||||||
return Err(Pep508Error {
|
return Err(Pep508Error {
|
||||||
message: Pep508ErrorSource::String(
|
message: Pep508ErrorSource::String(
|
||||||
"Missing space before ';', the end of the URL is ambiguous".to_string(),
|
"Missing space before ';', the end of the URL is ambiguous".to_string(),
|
||||||
|
@ -995,6 +995,7 @@ fn parse(cursor: &mut Cursor, working_dir: Option<&Path>) -> Result<Requirement,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let message = if marker.is_none() {
|
let message = if marker.is_none() {
|
||||||
format!(r#"Expected end of input or ';', found '{char}'"#)
|
format!(r#"Expected end of input or ';', found '{char}'"#)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue