File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use std::path::Path;
44use anyhow:: { anyhow, Result } ;
55use itertools:: Itertools ;
66use owo_colors:: OwoColorize ;
7+ use rustc_hash:: FxHashSet ;
78use tracing:: debug;
89
910use uv_cache:: Cache ;
@@ -466,9 +467,12 @@ pub(crate) async fn pip_compile(
466467 writeln ! ( writer, "--index-url {}" , index. url( ) . verbatim( ) ) ?;
467468 wrote_preamble = true ;
468469 }
470+ let mut seen = FxHashSet :: default ( ) ;
469471 for extra_index in index_locations. implicit_indexes ( ) {
470- writeln ! ( writer, "--extra-index-url {}" , extra_index. url( ) . verbatim( ) ) ?;
471- wrote_preamble = true ;
472+ if seen. insert ( extra_index. url ( ) ) {
473+ writeln ! ( writer, "--extra-index-url {}" , extra_index. url( ) . verbatim( ) ) ?;
474+ wrote_preamble = true ;
475+ }
472476 }
473477 }
474478
Original file line number Diff line number Diff line change @@ -5263,7 +5263,8 @@ fn emit_index_urls() -> Result<()> {
52635263 . arg( "--index-url" )
52645264 . arg( "https://test.pypi.org/simple/" )
52655265 . arg( "--extra-index-url" )
5266- . arg( "https://pypi.org/simple" ) , @r###"
5266+ . arg( "https://pypi.org/simple" )
5267+ . env( "UV_EXTRA_INDEX_URL" , "https://pypi.org/simple" ) , @r###"
52675268 success: true
52685269 exit_code: 0
52695270 ----- stdout -----
You can’t perform that action at this time.
0 commit comments