Skip to content

Commit

Permalink
fix: support multiple pip-extra-index-url with commas
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenfiszel committed Nov 12, 2024
1 parent 5e9870a commit 50861fc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions backend/windmill-worker/src/python_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,11 @@ pub async fn uv_pip_compile(
.clone()
.map(handle_ephemeral_token);
if let Some(url) = pip_extra_index_url.as_ref() {
args.extend(["--extra-index-url", url, "--no-emit-index-url"]);
pip_args.push(format!("--extra-index-url {}", url));
url.split(",").for_each(|url| {
args.extend(["--extra-index-url", url]);
pip_args.push(format!("--extra-index-url {}", url));
});
args.push("--no-emit-index-url");
}
let pip_index_url = PIP_INDEX_URL
.read()
Expand Down Expand Up @@ -279,7 +282,9 @@ pub async fn uv_pip_compile(
.clone()
.map(handle_ephemeral_token);
if let Some(url) = pip_extra_index_url.as_ref() {
args.extend(["--extra-index-url", url]);
url.split(",").for_each(|url| {
args.extend(["--extra-index-url", url]);
});
}
let pip_index_url = PIP_INDEX_URL
.read()
Expand Down Expand Up @@ -1167,7 +1172,9 @@ pub async fn handle_python_reqs(
.map(handle_ephemeral_token);

if let Some(url) = pip_extra_index_url.as_ref() {
command_args.extend(["--extra-index-url", url]);
url.split(",").for_each(|url| {
command_args.extend(["--extra-index-url", url]);
});
}
let pip_index_url = PIP_INDEX_URL
.read()
Expand Down

0 comments on commit 50861fc

Please sign in to comment.