mirror of
https://github.com/OthmanAdi/planning-with-files.git
synced 2026-04-25 16:06:02 +03:00
[PR #57] [MERGED] Fix Stop hook under /bin/sh (dash) #71
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/planning-with-files#71
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/OthmanAdi/planning-with-files/pull/57
Author: @SaladDay
Created: 1/24/2026
Status: ✅ Merged
Merged: 1/26/2026
Merged by: @OthmanAdi
Base:
master← Head:fix/stop-hook-posix-sh📝 Commits (1)
1c2dc40Fix Stop hook for POSIX sh (dash)📊 Changes
5 files changed (+105 additions, -15 deletions)
View changed files
📝
.codex/skills/planning-with-files/SKILL.md(+21 -3)📝
.cursor/skills/planning-with-files/SKILL.md(+21 -3)📝
.kilocode/skills/planning-with-files/SKILL.md(+21 -3)📝
.opencode/skills/planning-with-files/SKILL.md(+21 -3)📝
skills/planning-with-files/SKILL.md(+21 -3)📄 Description
Fix: POSIX sh Compatibility for Claude Code Stop Hook (Debian/Ubuntu)
Summary
On Debian/Ubuntu, Claude Code runs hooks via
/bin/sh(oftendash). The Stop hook command in several SKILL.md variants used bash-only syntax ([[ ... ]]and&>), causing the following errors:/bin/sh: 1: [[: not found/bin/sh: 1: : Permission deniedThis PR rewrites the Stop hook command to be POSIX
shcompatible while retaining the original behavior: use PowerShell on Windows when available; otherwise runcheck-complete.sh.Changes
[[/&>) with POSIX constructs ([/case/>/dev/null 2>&1)uname -s+OS=Windows_NTfor shell-agnostic Windows detectioncheck-complete.shviash(no assumptions about executable bit/shebang)Affected Files
skills/planning-with-files/SKILL.md.codex/skills/planning-with-files/SKILL.md.cursor/skills/planning-with-files/SKILL.md.kilocode/skills/planning-with-files/SKILL.md.opencode/skills/planning-with-files/SKILL.mdRepro / Test
/bin/sh(dash) without errors:CLAUDE_PLUGIN_ROOT=/tmp/planning-with-files /bin/sh -c '<stop hook snippet>'Context
Addresses the dash/
/bin/shStop hook failure described by @aqlkzf in #32.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.