From ba84aa806689bae5932b3b5a3633096e97aa5e9a Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Tue, 6 Dec 2022 02:04:58 -0800 Subject: [PATCH] deps: update --- ci/release/template/scripts/lib.sh | 6 ++++-- install.sh | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ci/release/template/scripts/lib.sh b/ci/release/template/scripts/lib.sh index 85162a382..3ebcfdb71 100644 --- a/ci/release/template/scripts/lib.sh +++ b/ci/release/template/scripts/lib.sh @@ -375,7 +375,7 @@ ensure_goarch() { } ensure_os() { - if [ -n "${OS-}" ]; then + if [ -n "${_OS-}" ]; then return fi uname=$(uname) @@ -383,9 +383,11 @@ ensure_os() { Linux) OS=linux;; Darwin) OS=macos;; FreeBSD) OS=freebsd;; - CYGWIN_NT*|MINGW32_NT*) OS=windows;; + MINGW32_NT*) OS=windows;; *) OS=$uname;; esac + # We cannot use $OS to check as $OS is defined in MinGW terminals by default. + _OS=1 } ensure_arch() { diff --git a/install.sh b/install.sh index 6946c8cd7..ede6c0141 100755 --- a/install.sh +++ b/install.sh @@ -511,7 +511,7 @@ ensure_goarch() { } ensure_os() { - if [ -n "${OS-}" ]; then + if [ -n "${_OS-}" ]; then return fi uname=$(uname) @@ -519,9 +519,11 @@ ensure_os() { Linux) OS=linux;; Darwin) OS=macos;; FreeBSD) OS=freebsd;; - CYGWIN_NT*|MINGW32_NT*) OS=windows;; + MINGW32_NT*) OS=windows;; *) OS=$uname;; esac + # We cannot use $OS to check as $OS is defined in MinGW terminals by default. + _OS=1 } ensure_arch() {