From e989de6252daf9d7c0da4a1192aaf9662f4da9b2 Mon Sep 17 00:00:00 2001 From: Kaan Atakan <96086061+KaanSD@users.noreply.github.com> Date: Wed, 22 Nov 2023 01:47:21 +0300 Subject: [PATCH] fix(install.sh): remove url validation (false negatives, redundant) https://github.com/pnpm/pnpm/issues/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. --- install.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/install.sh b/install.sh index 947b568..9e8c2c5 100644 --- a/install.sh +++ b/install.sh @@ -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 } @@ -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