graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
fix(install): curl-first release download, gh only as private-fork fallback (#96)
Racha022a1c3bbde
diff --git a/install.sh b/install.shindex f1b91312..560b0eda 100644--- a/install.sh+++ b/install.sh@@ -77,8 +77,8 @@ place_bin() {IFS="$oldifs"}-# Try the latest GitHub release for this platform. Uses `gh` when present-# (needed while the repo is private); plain curl once it's public.+# Try the latest GitHub release for this platform. Plain curl is the fast path+# now that the repo is public; gh is only a fallback for private forks.fetch_release() {local platform="$1" target asset tmpdcase "$platform" in@@ -94,12 +94,16 @@ fetch_release() {for stem in graff harness; doasset="$stem-$target.tar.gz"tmpd="$(mktemp -d)"- if command -v gh >/dev/null 2>&1; then- gh release download --repo "${REPO#https://github.com/}" --pattern "$asset" --dir "$tmpd" >/dev/null 2>&1 \- || { rm -rf "$tmpd"; continue; }+ # Public repo: plain curl is the fast path (no auth, and it can't hang the+ # way `gh release download` has been observed to on some machines). Fall+ # back to gh only if curl fails — e.g. a private fork — and gh is present.+ if curl -fsSL --max-time 60 "$REPO/releases/latest/download/$asset" -o "$tmpd/$asset" 2>/dev/null; then+ :+ elif command -v gh >/dev/null 2>&1 \+ && gh release download --repo "${REPO#https://github.com/}" --pattern "$asset" --dir "$tmpd" >/dev/null 2>&1; then+ :else- curl -fsSL "$REPO/releases/latest/download/$asset" -o "$tmpd/$asset" 2>/dev/null \- || { rm -rf "$tmpd"; continue; }+ rm -rf "$tmpd"; continuefibreakdone