Skip to content

Commit

Permalink
fix: ignore pypi logic on non pypi projects (#1705)
Browse files Browse the repository at this point in the history
fixes #1702

Co-authored-by: Tim de Jager <tdejager89@gmail.com>
  • Loading branch information
ruben-arts and tdejager authored Aug 1, 2024
1 parent dd094f0 commit b7d47a5
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/cli/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,23 @@ pub async fn execute(args: Args) -> miette::Result<()> {
let uv_context;
let index_locations;
let mut registry_index = if let Some(python_record) = python_record {
uv_context = UvResolutionContext::from_project(&project)?;
index_locations = pypi_options_to_index_locations(&environment.pypi_options());
tags = get_pypi_tags(
platform,
&environment.system_requirements(),
python_record.package_record(),
)?;
Some(RegistryWheelIndex::new(
&uv_context.cache,
&tags,
&index_locations,
&uv_types::HashStrategy::None,
))
if environment.has_pypi_dependencies() {
uv_context = UvResolutionContext::from_project(&project)?;
index_locations = pypi_options_to_index_locations(&environment.pypi_options());
tags = get_pypi_tags(
platform,
&environment.system_requirements(),
python_record.package_record(),
)?;
Some(RegistryWheelIndex::new(
&uv_context.cache,
&tags,
&index_locations,
&uv_types::HashStrategy::None,
))
} else {
None
}
} else {
None
};
Expand Down

0 comments on commit b7d47a5

Please sign in to comment.