fix: correct worktree-start heredoc bash syntax (#438)
Move the command-substitution closing paren after the heredoc terminator so bash -n passes and worktree lock checks run correctly. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
@@ -42,7 +42,7 @@ repo_root="$(cd "$script_dir/.." && pwd)"
|
|||||||
|
|
||||||
# Enforce issue-linked, traceable branch names (issue → branch → worktree → PR).
|
# Enforce issue-linked, traceable branch names (issue → branch → worktree → PR).
|
||||||
if [[ "$allow_unlinked" -eq 0 ]]; then
|
if [[ "$allow_unlinked" -eq 0 ]]; then
|
||||||
locked_branch=$(PYTHONPATH="$repo_root" python3 - <<'PY' "$branch")
|
locked_branch=$(PYTHONPATH="$repo_root" python3 - "$branch" <<'PY'
|
||||||
import sys
|
import sys
|
||||||
import issue_lock_store
|
import issue_lock_store
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ if not lock:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
print(lock.get("branch_name", ""), end="")
|
print(lock.get("branch_name", ""), end="")
|
||||||
PY
|
PY
|
||||||
)
|
)
|
||||||
if [[ -z "$locked_branch" ]]; then
|
if [[ -z "$locked_branch" ]]; then
|
||||||
echo "Error: No issue lock found for branch '$branch'. Lock the issue before branch creation (fail closed)." >&2
|
echo "Error: No issue lock found for branch '$branch'. Lock the issue before branch creation (fail closed)." >&2
|
||||||
exit 2
|
exit 2
|
||||||
|
|||||||
Reference in New Issue
Block a user