Skip to content

Commit

Permalink
Revert "Add support for extra-only"
Browse files Browse the repository at this point in the history
This reverts commit 2f0660a.
  • Loading branch information
cd-work committed Oct 11, 2023
1 parent 2f0660a commit 54fdbfa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lockfile/src/parsers/pypi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,13 @@ fn line<'a>(input: &'a str, registry: &mut Option<&'a str>) -> IResult<&'a str,

// Ignore index config options.
//
// Since `ThirdPartyVersion` only allows a single registry, we prefer recording
// only the primary one.
// Since `ThirdPartyVersion` only allows a single registry, we only record the
// primary one.
if let Some(index_url) = line.strip_prefix("--index-url") {
*registry = Some(index_url.trim());
line = "";
}
if let Some(extra_index_url) = line.strip_prefix("--extra-index-url") {
// Only use extra index URL if no other URL has been specified.
if registry.is_none() {
*registry = Some(extra_index_url.trim());
}
if line.starts_with("--extra-index-url") {
line = "";
}

Expand Down

0 comments on commit 54fdbfa

Please sign in to comment.