claude-plan-review 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-plan-review",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Review, comment on, and approve/reject Claude Code plans in a local GitHub-style web UI — with persistent comments, version history, and diffs.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -35,12 +35,13 @@ function chooseRuntime(args) {
35
35
 
36
36
  function hookCommand(args) {
37
37
  const runtime = chooseRuntime(args);
38
- // global install → use the bare `claude-plan-review` command (resolved via PATH at hook time).
39
- // We intentionally do NOT hardcode an absolute path: version managers like fnm/nvm expose
40
- // bins via per-shell paths that don't persist across sessions.
38
+ // global install → always route through the package runner (npx/bunx), never the bare
39
+ // `claude-plan-review` command. Version managers like fnm/nvm expose global bins only via a
40
+ // per-shell PATH set up by interactive shell init. `canRun` succeeds here (init runs in an
41
+ // interactive shell) but Claude Code fires hooks in a NON-interactive shell where that PATH
42
+ // is absent, so the bare command resolves at init time yet fails — silently — at hook time.
43
+ // `npx`/`bunx` are inherited reliably from Claude Code's launching env, so they work either way.
41
44
  if (args.includes("--global")) {
42
- if (canRun("claude-plan-review")) return "claude-plan-review hook";
43
- // not on PATH → fall back to the package runner
44
45
  return runtime === "node" ? "npx claude-plan-review hook" : "bunx claude-plan-review hook";
45
46
  }
46
47
  if (args.includes("--published") || args.includes("--bunx")) {