From ca2be71f888f47a9335d6acb6da849911e006574 Mon Sep 17 00:00:00 2001 From: claude-hdb Date: Wed, 15 Jul 2026 00:38:51 +0000 Subject: [PATCH] fix(install): find THE extracted directory instead of guessing its name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tarball's top dir is -, and the extractor globbed claudebox-* — dead the moment the repo became heavy-duty/box: every 'curl install.sh | bash' and every drill died with 'could not find the extracted source directory'. The archive has exactly one top-level directory; take it whatever it is called, and let the existing bin/box check judge whether it is the right tree. Survives the next rename too. Verified against the live tarball: BOX_HOME/BOX_BIN scratch install from heavy-duty/box@main lands and 'box --version' answers 0.5.0. Co-Authored-By: Claude Fable 5 --- install.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 04d33f4..1d269e0 100755 --- a/install.sh +++ b/install.sh @@ -37,9 +37,13 @@ log "extracting archive" tar -xzf "$TMPDIR/box.tar.gz" -C "$TMPDIR" \ || die "failed to extract archive" -# GitHub names the archive's top dir after the REPO, which is still 'claudebox': -# it extracts to claudebox-/. That is repo-derived, not a stray brand. -EXTRACTED="$(find "$TMPDIR" -maxdepth 1 -type d -name 'claudebox-*' | head -n1)" +# GitHub names the archive's top dir - (slashes in a ref become +# dashes) — deriving that name is guesswork, and it broke for real at the +# claudebox → box rename, when this glob kept looking for claudebox-* and the +# installer died on every host. The tarball has exactly ONE top-level +# directory: take the directory, whatever it is called, and let the bin/box +# check below judge whether it is the right tree. +EXTRACTED="$(find "$TMPDIR" -mindepth 1 -maxdepth 1 -type d | head -n1)" [ -n "$EXTRACTED" ] || die "could not find the extracted source directory in archive" [ -f "$EXTRACTED/bin/box" ] || die "archive does not contain bin/box — is $REPO@$REF correct?" -- 2.45.2