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 e989de6
Showing 1 changed file with 0 additions and 13 deletions.
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 e989de6

Please sign in to comment.