8f1a260d96
Includes PR #745 isolated credentials fix - prevents API key hijacking from random project .env files by using centralized credentials from ~/.claude-mem/.env Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.2 KiB
2.2 KiB
Phase 03: Merge PR #827 - Bun Runner for Fresh Install
PR: https://github.com/thedotmack/claude-mem/pull/827
Branch: fix/fresh-install-bun-path-818
Status: Has conflicts, needs rebase
Review: Approved by bayanoj330-dev
Priority: MEDIUM - Fixes fresh installation issues
Summary
Fixes the fresh install issue where worker fails to start because Bun isn't in PATH yet after smart-install.js installs it.
Root Cause: On fresh installations:
smart-install.jsinstalls Bun to~/.bun/bin/bun- Bun isn't in current shell's PATH until terminal restart
- Hooks try to run
bun ...directly and fail - Worker never starts, database never created
Solution: Introduce bun-runner.js - a Node.js script that finds Bun in common install locations (not just PATH) and runs commands with it.
Files Changed
| File | Change |
|---|---|
plugin/scripts/bun-runner.js |
NEW: Script to find and run Bun |
plugin/hooks/hooks.json |
Use node bun-runner.js instead of direct bun calls |
Dependencies
- None - Independent fix
Fixes Issues
- #818
Bun Search Locations
The bun-runner checks these locations in order:
- PATH (via
which/where) ~/.bun/bin/bun(default install location)/usr/local/bin/bun/opt/homebrew/bin/bun(macOS Homebrew)/home/linuxbrew/.linuxbrew/bin/bun(Linuxbrew)- Windows:
%LOCALAPPDATA%\bun\bin\bun.exewith fallback
Tasks
- Checkout PR branch
fix/fresh-install-bun-path-818and rebase onto main to resolve conflicts - Review
bun-runner.jsfor correctness across platforms - Verify hooks.json uses correct
node bun-runner.jspattern - Verify build succeeds after rebase
- Merge PR #827 to main
- Test on fresh install (uninstall claude-mem, reinstall) to verify Bun is found
Verification
# After merge, verify bun-runner finds Bun
node plugin/scripts/bun-runner.js --version
# Check hooks.json uses bun-runner
grep -i "bun-runner" plugin/hooks/hooks.json
Notes
- This is a surgical fix that doesn't change core functionality
- All hooks now go through the Node.js bun-runner script
- Cross-platform: Linux, macOS, Windows
- The bun-runner approach is more robust than relying on PATH