From 7763ec89f534642f577bce857906a5d67e5f5e9e Mon Sep 17 00:00:00 2001 From: Tim Head Date: Fri, 15 Nov 2024 15:30:05 +0100 Subject: [PATCH] Quote packages so shells don't get unhappy (#561) Co-authored-by: Bradley Dice --- _includes/selector.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/_includes/selector.html b/_includes/selector.html index 8dcee1337fd..dd38f21a5c5 100644 --- a/_includes/selector.html +++ b/_includes/selector.html @@ -556,14 +556,14 @@ else { index_url = `--${this.highlightFlag("extra-index-url")}=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple`; var version = this.removeLeadingZeros("{{ site.data.releases.nightly.version }}") - cuda_suffix = cuda_suffix + `>=${version}.0a0,<=${version}"`; + cuda_suffix = cuda_suffix + `>=${version}.0a0,<=${version}`; var libraryToPkg = (pkg) => { pkg = pkg.toLowerCase(); - if (pkg === "cuspatial/cuproj") return ["\"cuspatial" + cuda_suffix, "\"cuproj" + cuda_suffix]; - if (pkg === "raft") return ["\"pylibraft" + cuda_suffix, "\"raft-dask" + cuda_suffix]; - if (pkg === "cuvs") return ["\"cuvs" + cuda_suffix, "\"pylibraft" + cuda_suffix]; - if (pkg === "cugraph/nx-cugraph") return ["\"cugraph" + cuda_suffix, "\"nx-cugraph" + cuda_suffix]; - return ["\"" + pkg + cuda_suffix]; + if (pkg === "cuspatial/cuproj") return ["cuspatial" + cuda_suffix, "cuproj" + cuda_suffix]; + if (pkg === "raft") return ["pylibraft" + cuda_suffix, "raft-dask" + cuda_suffix]; + if (pkg === "cuvs") return ["cuvs" + cuda_suffix, "pylibraft" + cuda_suffix]; + if (pkg === "cugraph/nx-cugraph") return ["cugraph" + cuda_suffix, "nx-cugraph" + cuda_suffix]; + return [pkg + cuda_suffix]; } } @@ -583,9 +583,12 @@ // pkgs.length == 2 because it includes the "Choose Specific Packages" option if (this.active_release === "Nightly" && !(pkgs.length === 2 && pkgs[0] === "cucim")) { - pkgs.push(["\"dask-cuda" + cuda_suffix.slice(5)]) + pkgs.push(["dask-cuda" + cuda_suffix.slice(5)]) } + // Make sure all packages (and version selectors) are quoted + pkgs = pkgs.flatMap(pkg => '"' + pkg + '"'); + // For every n packages add a new line with a "\" character // We need i += n + 1 since the splice adds a new element to the array if (this.active_release === "Stable") {