From 769ea1867c6421b465c47b303f03380ebd5f9683 Mon Sep 17 00:00:00 2001 From: Alex Hancock Date: Tue, 14 Oct 2025 16:16:43 -0400 Subject: [PATCH] fix: adjust download_cli.sh to tolerate no OS variable (#5169) --- download_cli.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download_cli.sh b/download_cli.sh index 610ca081fc..30a142ef5b 100755 --- a/download_cli.sh +++ b/download_cli.sh @@ -37,7 +37,7 @@ if ! command -v tar >/dev/null 2>&1 && ! command -v unzip >/dev/null 2>&1; then fi # Check for required extraction tools based on detected OS -if [ "$OS" = "windows" ]; then +if [ "${OS:-}" = "windows" ]; then # Windows uses PowerShell's built-in Expand-Archive - check if PowerShell is available if ! command -v powershell.exe >/dev/null 2>&1 && ! command -v pwsh >/dev/null 2>&1; then echo "Warning: PowerShell is recommended to extract Windows packages but was not found." @@ -45,7 +45,7 @@ if [ "$OS" = "windows" ]; then fi else if ! command -v tar >/dev/null 2>&1; then - echo "Error: 'tar' is required to extract packages for $OS. Please install tar and try again." + echo "Error: 'tar' is required to extract packages for ${OS:-unknown}. Please install tar and try again." exit 1 fi fi