File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161fi
6262
6363# --- Download and Extract ---
64- # The download is a .tar.gz file which needs to be extracted
64+ # The download is a .tar.gz or .zip file which needs to be extracted
6565if [ " $CLI_OS " = " windows" ]; then
6666 URL=" https://github.com/kosli-dev/cli/releases/download/${VERSION} /kosli_${VERSION_FILENAME} _${CLI_OS} _${ARCH} .zip"
67+ # Download and extract for Windows
68+ if ! curl -L --fail " $URL " -o kosli.zip; then
69+ echo " Error: Download failed. Please check the URL and your network connection."
70+ exit 1
71+ fi
72+ unzip -o kosli.zip
6773else
6874 URL=" https://github.com/kosli-dev/cli/releases/download/${VERSION} /kosli_${VERSION_FILENAME} _${CLI_OS} _${ARCH} .tar.gz"
69- fi
70- echo " Downloading from: $URL "
71-
72- # Download and extract in one go
73- if ! curl -L --fail " $URL " | tar zx; then
74- echo " Error: Download or extraction failed. Please check the URL and your network connection."
75- exit 1
75+ # Download and extract for Linux and Darwin
76+ if ! curl -L --fail " $URL " | tar zx; then
77+ echo " Error: Download or extraction failed. Please check the URL and your network connection."
78+ exit 1
79+ fi
7680fi
7781
7882# --- Installation ---
You can’t perform that action at this time.
0 commit comments