From 58444fd37fc468a91c8a41e5079d8a25705bd970 Mon Sep 17 00:00:00 2001 From: Jose B Date: Thu, 4 Dec 2025 13:45:34 -0500 Subject: [PATCH] chore: fix just installation by using versioned release URLs The previous implementation used `/latest/download/` which doesn't work with just's release naming convention. Now fetches the latest version tag from GitHub API and constructs the correct versioned download URL. --- setup.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index b156757..af3c2d7 100755 --- a/setup.sh +++ b/setup.sh @@ -222,8 +222,18 @@ install_just() { ;; esac - local binary_name="just-${arch}-${os}" - local download_url="https://github.com/casey/just/releases/latest/download/${binary_name}.tar.gz" + # Get latest version from GitHub API + log_info "Fetching latest version..." + local latest_version=$(curl -fsSL https://api.github.com/repos/casey/just/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') + + if [ -z "$latest_version" ]; then + log_error "Failed to fetch latest version" + log_info "Please install just manually: https://github.com/casey/just#installation" + exit 1 + fi + + local binary_name="just-${latest_version}-${arch}-${os}" + local download_url="https://github.com/casey/just/releases/download/${latest_version}/${binary_name}.tar.gz" local install_dir="$HOME/.local/bin" # Create install directory