-
-
Notifications
You must be signed in to change notification settings - Fork 320
Closed
Labels
good first issueGood for newcomersGood for newcomers
Description
When I run ccusage v9.0.0 or later with Deno, the following error occurs:
$ deno run -E -R=$HOME/.claude/projects/ -S=homedir -N='raw.githubusercontent.com:443' npm:[email protected]
❌ Denied read access to "/home/tanaka/.claude".
error: Uncaught (in promise) NotCapable: Requires read access to "/home/tanaka/.claude", run again with the --allow-read flag
at Object.statSync (ext:deno_fs/30_fs.js:415:3)
at Object.statSync (ext:deno_node/_fs/_fs_stat.ts:163:25)
at isTypeSync (file:///home/tanaka/.cache/deno/npm/registry.npmjs.org/ccusage/9.0.0/dist/data-loader-Ca8k_uX0.js:396:24)
at getDefaultClaudePath (file:///home/tanaka/.cache/deno/npm/registry.npmjs.org/ccusage/9.0.0/dist/data-loader-Ca8k_uX0.js:3114:7)
at file:///home/tanaka/.cache/deno/npm/registry.npmjs.org/ccusage/9.0.0/dist/mcp-BRFYI5rd.js:37550:38Cause
It seems this issue was introduced because a new process was added in data-loader.ts to check for the existence of CLAUDE_CONFIG_DIR, which now requires read access to the entire .claude directory.
Line 30 in ee7d7b6
| if (!isDirectorySync(envClaudeCodePath)) { |
Proposed Solution
The .claude directory contains credentials. I would like to request that the behavior reverts to how it was in v8, where permissions were only required for the .claude/projects subdirectory.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers