[PR #49] [MERGED] Fix Stop hook path resolution when CLAUDE_PLUGIN_ROOT is not set #66

Closed
opened 2026-03-03 18:50:25 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/OthmanAdi/planning-with-files/pull/49
Author: @fahmyelraie
Created: 1/21/2026
Status: Merged
Merged: 1/22/2026
Merged by: @OthmanAdi

Base: masterHead: fix-stop-hook-path-resolution


📝 Commits (1)

  • d019234 Fix Stop hook path resolution when CLAUDE_PLUGIN_ROOT is not set

📊 Changes

6 files changed (+15 additions, -10 deletions)

View changed files

📝 .codex/skills/planning-with-files/SKILL.md (+3 -2)
📝 .cursor/skills/planning-with-files/SKILL.md (+3 -2)
📝 .kilocode/skills/planning-with-files/SKILL.md (+3 -2)
📝 .opencode/skills/planning-with-files/SKILL.md (+3 -2)
📝 scripts/check-complete.sh (+0 -0)
📝 skills/planning-with-files/SKILL.md (+3 -2)

📄 Description

The Stop hook was failing with "No such file or directory" error when CLAUDE_PLUGIN_ROOT was not properly set in the environment, resulting in the script path resolving to "/scripts/check-complete.sh" instead of the full path.

Changes:

  • Add SCRIPT_DIR variable with fallback to explicit path
  • Use $HOME/.claude/plugins/planning-with-files/scripts as fallback when CLAUDE_PLUGIN_ROOT is not set
  • Make check-complete.sh executable (chmod +x)
  • Apply fix to both Unix and Windows paths in the hook command

This ensures the Stop hook runs successfully even when CLAUDE_PLUGIN_ROOT is not available in the shell environment.

Fixes the error: "bash: /scripts/check-complete.sh: No such file or directory"


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/OthmanAdi/planning-with-files/pull/49 **Author:** [@fahmyelraie](https://github.com/fahmyelraie) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/22/2026 **Merged by:** [@OthmanAdi](https://github.com/OthmanAdi) **Base:** `master` ← **Head:** `fix-stop-hook-path-resolution` --- ### 📝 Commits (1) - [`d019234`](https://github.com/OthmanAdi/planning-with-files/commit/d019234778588f7b962f535dcf713d80a99c5ef3) Fix Stop hook path resolution when CLAUDE_PLUGIN_ROOT is not set ### 📊 Changes **6 files changed** (+15 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `.codex/skills/planning-with-files/SKILL.md` (+3 -2) 📝 `.cursor/skills/planning-with-files/SKILL.md` (+3 -2) 📝 `.kilocode/skills/planning-with-files/SKILL.md` (+3 -2) 📝 `.opencode/skills/planning-with-files/SKILL.md` (+3 -2) 📝 `scripts/check-complete.sh` (+0 -0) 📝 `skills/planning-with-files/SKILL.md` (+3 -2) </details> ### 📄 Description The Stop hook was failing with "No such file or directory" error when CLAUDE_PLUGIN_ROOT was not properly set in the environment, resulting in the script path resolving to "/scripts/check-complete.sh" instead of the full path. Changes: - Add SCRIPT_DIR variable with fallback to explicit path - Use $HOME/.claude/plugins/planning-with-files/scripts as fallback when CLAUDE_PLUGIN_ROOT is not set - Make check-complete.sh executable (chmod +x) - Apply fix to both Unix and Windows paths in the hook command This ensures the Stop hook runs successfully even when CLAUDE_PLUGIN_ROOT is not available in the shell environment. Fixes the error: "bash: /scripts/check-complete.sh: No such file or directory" --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 18:50:25 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/planning-with-files#66
No description provided.