You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in file https://github.com/shelltime/cli/blob/main/model/ccusage_service.go#L213 and https://github.com/shelltime/cli/blob/main/model/ccusage_service.go#L214, we call exec.LookPath to get the executable bunx or npx. But it could not find the daemon service. maybe because the PATH is not inherited from the env.
pls create a custom LookPath function try to find the properly executable binary.
Found the issue at model/ccusage_service.go:213-214. The code uses exec.LookPath to find bunx and npx executables, but when running as a daemon service, the PATH environment variable may not include user-specific Node.js installation paths.
Solution
Created a custom lookPath function that:
First tries the standard exec.LookPath (checks system PATH)
Falls back to checking common installation locations for Node.js package managers
Activity
claude commentedon Oct 2, 2025
Claude finished @AnnatarHe's task —— View job •
claude/issue-112-20251002-0939• Create PR ➔Fixed the
exec.LookPathissue ✓Analysis
Found the issue at
model/ccusage_service.go:213-214. The code usesexec.LookPathto findbunxandnpxexecutables, but when running as a daemon service, the PATH environment variable may not include user-specific Node.js installation paths.Solution
Created a custom
lookPathfunction that:exec.LookPath(checks system PATH)The function searches these locations:
~/.npm-global/bin,~/.npm/bin,~/.local/share/pnpm,~/.bun/bin,~/.nvm/current/bin/usr/local/bin,/opt/homebrew/bin/usr/bin,/binNVM_DIRenvironment variable when availableChanges
lookPath()function inmodel/ccusage_service.go:212-296exec.LookPathcalls withlookPathat lines 301-302filepathandruntimepackagesTasks
model/ccusage_service.goLookPathfunction for finding node package managersexec.LookPathcalls with the new functionNext Steps
--- | Branch:
claude/issue-112-20251002-0939fix(model): implement custom lookPath for node package managers