From 6e61f4519c9eb799bfe4746fbaf0ab0dd86ffae2 Mon Sep 17 00:00:00 2001 From: Aric Camarata Date: Sun, 16 Aug 2026 11:46:59 -0400 Subject: [PATCH] fix(ci): strip nested dir when extracting nself release tarball in quarterly-doc-audit The CLI release tarballs (nself-${VERSION}-${OS}-${ARCH}.tar.gz) nest the binary inside a nself-${VERSION}-${OS}-${ARCH}/ directory. The audit-tool install step extracted flat into /tmp and then did 'mv /tmp/nself ...', which no longer finds the binary since the release packaging added the wrapping directory. Add --strip-components=1 (matching the fix already applied in nchat/nclaw/nfamily/clawde/homebrew-nself) and fail soft instead of hard-erroring the whole audit if the download/extract ever fails. Verified: current v1.2.5 linux-amd64 tarball extracts /tmp/nself correctly with this flag; confirmed live failures in this repo's quarterly-doc-audit runs before this fix (mv: cannot stat '/tmp/nself'). --- .github/workflows/quarterly-doc-audit.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/quarterly-doc-audit.yml b/.github/workflows/quarterly-doc-audit.yml index 7a192896..4a3622a5 100644 --- a/.github/workflows/quarterly-doc-audit.yml +++ b/.github/workflows/quarterly-doc-audit.yml @@ -52,9 +52,13 @@ jobs: | grep tag_name | head -1 | cut -d'"' -f4 | sed 's/^v//') OS=$(uname -s | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') - curl -fsSL "https://github.com/nself-org/cli/releases/download/v${LATEST}/nself-${LATEST}-${OS}-${ARCH}.tar.gz" \ - | tar -xz -C /tmp - sudo mv /tmp/nself /usr/local/bin/nself + if curl -fsSL "https://github.com/nself-org/cli/releases/download/v${LATEST}/nself-${LATEST}-${OS}-${ARCH}.tar.gz" \ + | tar -xz -C /tmp --strip-components=1; then + # release tarballs nest a nself---/ dir — strip it + sudo mv /tmp/nself /usr/local/bin/nself + else + echo "::warning::nself release download/extract failed — audit tool unavailable, skipping" + fi fi nself --version || true