You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(lefthook): check-affected pre-push job fails to parse on Windows and blocks every push #11356
On Windows (lefthook 2.2.2, Git for Windows sh.exe), the check-affected pre-push job in lefthook.yml exits 2 before running any check, which blocks the push:
merge-base: -c: line 2: unexpected EOF while looking for matching `)'
┃ check-affected ❯
exit status 2
error: failed to push some refs
lefthook run pre-push --job check-affected --verbose shows the cause. Lefthook wraps the multi-line run: body in double quotes without escaping the double quotes inside it:
[lefthook] run: "C:\Program Files\Git\bin\sh.exe" -c "if ! mb="$(git merge-base HEAD refs/remotes/origin/main 2>/dev/null)"; then ...
Windows argv parsing ends the -c string at the first inner ", so sh gets a truncated script and $0 becomes merge-base.
Reproduce
On Windows, in any worktree of this repo, run lefthook run pre-push --job check-affected --verbose. It failed the same way twice on 2026-10-30, at commit 97e944b (lefthook.yml last changed in 67f790d).
Fix direction
Keep the run: body free of double quotes, or move it into a script that lefthook runs by path. Either way, keep the job's rule that check code is taken from the merge-base.
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Understood: on Windows with lefthook 2.2.2 and Git for Windows sh.exe, the check-affected pre-push job in lefthook.yml fails to parse. Lefthook wraps the multi-line run: body in unescaped double quotes, so sh -c receives a truncated script and every push is blocked. The suggested fix is to keep the body free of double quotes, or move it into a script that lefthook runs by path, while still taking check code from the merge-base. The report has clear repro steps. I found no likely duplicates.
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).
melodic-automation-lanes commented on Oct 30, 2026
Activity
github-actions commentedon Oct 30, 2026
Proposed work class: work-class: scoped
Basis: automated intake triage; the lanes App applied this class.
Size: Small
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: none
Understood: on Windows with lefthook 2.2.2 and Git for Windows sh.exe, the
check-affectedpre-push job inlefthook.ymlfails to parse. Lefthook wraps the multi-linerun:body in unescaped double quotes, sosh -creceives a truncated script and every push is blocked. The suggested fix is to keep the body free of double quotes, or move it into a script that lefthook runs by path, while still taking check code from the merge-base. The report has clear repro steps. I found no likely duplicates.Automated triage, applied by the lanes App.
melodic-automation-lanes commentedon Oct 30, 2026
Not admitted to the issue lane: no trusted-human acceptance criteria: a listed human must put the confirmed
- [ ]criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).melodic-automation-lanes commentedon Oct 30, 2026
The latest triage verdict holds nothing: admission moved the issue to
status: confirmed; its comment says why.