Skip to content

Commit 9779b1b

Browse files
authored
Merge pull request #68 from redhat-documentation/fix/orchestrator-plugin-root-fallback
Fix orchestrator setup-hooks.sh when CLAUDE_PLUGIN_ROOT is unset
2 parents 5b7f110 + d19773e commit 9779b1b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

plugins/docs-tools/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs-tools",
3-
"version": "0.0.15",
3+
"version": "0.0.16",
44
"description": "Documentation review, writing, and workflow tools for Red Hat AsciiDoc and Markdown documentation.",
55
"author": {
66
"name": "Red Hat Documentation Team",

plugins/docs-tools/skills/docs-orchestrator/scripts/setup-hooks.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
set -e
88

99
SETTINGS_FILE=".claude/settings.json"
10-
HOOKS_SRC="${CLAUDE_PLUGIN_ROOT}/skills/docs-orchestrator/hooks"
10+
11+
# Derive plugin root from script location if CLAUDE_PLUGIN_ROOT is not set
12+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13+
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$SCRIPT_DIR/../../.." && pwd)}"
14+
HOOKS_SRC="${PLUGIN_ROOT}/skills/docs-orchestrator/hooks"
1115

1216
# Copy hook script into the project
1317
mkdir -p .claude/hooks

0 commit comments

Comments
 (0)