Skip to content

Commit

Permalink
fix(install.sh): remove url validation (false negatives, redundant)
Browse files Browse the repository at this point in the history
pnpm/pnpm#7336

Removed url validation since it fails sometimes even though the actual download would succeed. It is also fairly pointless to begin with, only preventing the creation and deletion of a temporary directory.
  • Loading branch information
KaanSD committed Nov 23, 2023
1 parent ab292a5 commit 9c4fa61
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion SHASUMS256.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ d6e6538b8fa1147a58efac1ed2bf7f3311aecd5d8e1b11c0070794a5c5b151d8 v6.6.js
c80817f1dac65ee497fc8ca0b533e497aacfbf951a917ff4652825710bbacda7 v6.14.js
675896fe510fe86a6c4812c46334aafe789a05dd60652cca768b78971ca2b906 v6.16.js
be155eed896aa8c7900352c2b28640bcbace13171ec632b0e29f0ac94e5b27d1 v6.32.js
df09f85bfcdffe6c2a1bd0966bdd65404859b72b64e941244e65dcd2d9148485 install.sh
f8c728b2048a92948aff1979db70e21e89f410528d2d133112f1e2acc0214b34 install.sh
7881ea9b132eb7c6d12db6f14ca55bbb5d251edf08693d570eac31ad0d00c827 install.ps1
Binary file removed SHASUMS256.txt.sig
Binary file not shown.
13 changes: 0 additions & 13 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,6 @@ download() {
fi
}

validate_url() {
local url
url="$1"

if command -v curl > /dev/null 2>&1; then
curl --output /dev/null --silent --show-error --location --head --fail "$url"
else
wget --spider --quiet "$url"
fi
}

is_glibc_compatible() {
getconf GNU_LIBC_VERSION >/dev/null 2>&1 || ldd --version >/dev/null 2>&1 || return 1
}
Expand Down Expand Up @@ -106,8 +95,6 @@ download_and_install() {
archive_url="${archive_url}.exe"
fi

validate_url "$archive_url" || abort "pnpm version '${version}' could not be found"

# install to PNPM_HOME, defaulting to ~/.pnpm
tmp_dir="$(mktemp -d)" || abort "Tmpdir Error!"
trap 'rm -rf "$tmp_dir"' EXIT INT TERM HUP
Expand Down

0 comments on commit 9c4fa61

Please sign in to comment.