From 6d43cf0eef0a39edfb67bb94f88bbbdf2294e9a6 Mon Sep 17 00:00:00 2001 From: Kiet Ho Date: Sun, 22 Nov 2026 22:09:05 -0800 Subject: [PATCH] fix(cli): install the latest CLI when the requested release does not exist Desktop 2.0.3, 2.0.6 and 2.0.7 have no matching CLI release, so Set up over SSH from those versions stopped on a 404. The installer now warns and installs cli-latest instead. --- apps/marketing/public/cli/install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/marketing/public/cli/install.sh b/apps/marketing/public/cli/install.sh index 55f687a2018..06fb582b710 100755 --- a/apps/marketing/public/cli/install.sh +++ b/apps/marketing/public/cli/install.sh @@ -52,8 +52,9 @@ download_tarball() { target="$1" tarball="superset-${target}.tar.gz" + latest_url="https://github.com/${REPO}/releases/download/cli-latest/${tarball}" if [ "$TAG" = "latest" ]; then - url="https://github.com/${REPO}/releases/download/cli-latest/${tarball}" + url="$latest_url" else url="https://github.com/${REPO}/releases/download/${TAG}/${tarball}" fi @@ -61,8 +62,17 @@ download_tarball() { info "Downloading $url" tmp="$(mktemp -t superset-install.XXXXXX)" if ! curl -fsSL -o "$tmp" "$url"; then - rm -f "$tmp" - error "Failed to download $url" + # Some desktop versions have no CLI release, and `hosts add` asks for its own version. + if [ "$url" = "$latest_url" ]; then + rm -f "$tmp" + error "Failed to download $url" + fi + warn "No CLI release ${TAG} for ${target}. Installing the latest release." + info "Downloading $latest_url" + if ! curl -fsSL -o "$tmp" "$latest_url"; then + rm -f "$tmp" + error "Failed to download $latest_url" + fi fi echo "$tmp" }