Skip to content

fix: use PIPELINE_DIR for config and hooks.d paths in log.sh#35

Merged
fdaviddpt merged 1 commit intomainfrom
fix/log-sh-marketplace-paths
Apr 25, 2026
Merged

fix: use PIPELINE_DIR for config and hooks.d paths in log.sh#35
fdaviddpt merged 1 commit intomainfrom
fix/log-sh-marketplace-paths

Conversation

@fdaviddpt
Copy link
Copy Markdown
Contributor

Summary

log.sh hardcoded config.json and hooks.d paths relative to PROJECT_DIR/.claude/remember/, which breaks marketplace installs where the plugin lives in ~/.claude/plugins/cache/ instead.

The bug (issue #19)

In marketplace installs, save-session.sh calls log.sh which tries to read $PROJECT_DIR/.claude/remember/config.json — a path that doesn't exist. Config defaults are used silently, and hooks.d dispatch never finds any hooks.

The fix

Two lines in log.sh:

# Before
REMEMBER_CONFIG="${PROJECT_DIR:-.}/.claude/remember/config.json"
REMEMBER_HOOKS_DIR="${PROJECT_DIR:-.}/.claude/remember/hooks.d"

# After
REMEMBER_CONFIG="${PIPELINE_DIR:-${PROJECT_DIR:-.}/.claude/remember}/config.json"
REMEMBER_HOOKS_DIR="${PIPELINE_DIR:-${PROJECT_DIR:-.}/.claude/remember}/hooks.d"

Uses PIPELINE_DIR (set by resolve-paths.sh) with fallback to the old path for backward compat with local installs.

Tests

4 new tests in TestMarketplacePathResolution: source inspection for both paths, marketplace layout config resolution, hooks.d dispatch from plugin directory.

Closes #19. Full suite: 224 passed, 99% coverage.

Thank you @vince-finqub for the detailed issue report with exact line numbers and suggested fixes — the analysis was spot on.

log.sh hardcoded config and hooks.d paths relative to
PROJECT_DIR/.claude/remember/, which breaks marketplace installs
where the plugin lives in ~/.claude/plugins/cache/ instead.

Fix: use PIPELINE_DIR (set by resolve-paths.sh) with fallback to
the old PROJECT_DIR-based path for backward compatibility with
local installs.

4 new tests: source inspection for both paths, marketplace layout
config resolution, hooks.d dispatch from plugin directory.

Closes #19

Co-Authored-By: Max <noreply>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

save-session.sh derives PROJECT_DIR from script path — fails when installed as plugin

1 participant