Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(install.sh): remove url validation (false negatives, redundant) #35

Merged
merged 3 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5b451a2e1899cf48b1363425e759ce986920be0b173b363ed4fa135a06756641 install.sh
89d38e03ff1a3ba5d74253570d9a8438db6f263c79c756a13b7fce2bd3f93f29 install.sh
7881ea9b132eb7c6d12db6f14ca55bbb5d251edf08693d570eac31ad0d00c827 install.ps1
Binary file modified 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
Loading