Repository navigation
fix: fall back to dirname/unknown when git context is absent - #564
Closed
collinstraka-clov wants to merge 1 commit into
Closed
collinstraka-clov wants to merge 1 commit into
collinstraka-clov wants to merge 1 commit into
Conversation
gstack-review-log uses set -euo pipefail, which treats empty strings as unbound variables. When run outside a git repo (or in a repo with no remote), gstack-slug produced empty SLUG and BRANCH, causing: gstack-review-log: line 8: SLUG: unbound variable gstack-review-log: line 9: BRANCH: unbound variable Fix: add || true to prevent set -e from aborting on git failures, then fall back to the current directory name for SLUG and "unknown" for BRANCH. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5 tasks done
Contributor
|
@16francej Please close this PR. Current main already handles missing Git context and includes stronger safe slug caching. This branch targets the old helper, so its useful idea has already been incorporated. |
Contributor
|
Thanks for this, @collinstraka-clov. The fix is now on main: bin/gstack-slug was rewritten with basename and username fallbacks (already on main as of v1.91.16.0). Closing as superseded; if you still see the problem on the latest gstack, please open an issue with ./setup --status output. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
gstack-review-logusesset -euo pipefail, which treats empty strings as unbound variables. When run outside a git repo (or in a repo with no remote configured),gstack-slugproduces empty strings forSLUGandBRANCH, causing:This breaks any gstack review skill (e.g.
/autoplan,/plan-ceo-review) when the working directory isn't a git repo with a remote.Fix
Two changes in
gstack-slug:|| trueto the git commands soset -edoesn't abort when git context is missingbasename "$PWD"forSLUGand"unknown"forBRANCHwhen the values are emptyRepro
Run any gstack review skill in a directory with no git remote configured.
🤖 Generated with Claude Code