fix: detect TaskMaster CLI installation on Windows#871
Conversation
checkTaskMasterInstallation spawned 'which' via shell, but cmd.exe has no 'which' builtin, so the check always failed on Windows and reported TaskMaster as not installed even when it was on PATH. Use 'where' on win32 and take the first line of its output, since 'where' can return multiple matches (task-master and task-master.cmd). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesTask-master cross-platform installation detection
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
On Windows, the TaskMaster setup screen always reports the CLI as not installed ("TaskMaster CLI not found in PATH"), even when
task-master-aiis installed globally via npm and available on PATH.Cause
checkTaskMasterInstallation()inserver/routes/taskmaster.jsruns:With
shell: trueon Windows, Node spawnscmd.exe, which has nowhichcommand (the Windows equivalent iswhere). The lookup therefore always exits non-zero and the endpoint returnsisInstalled: false.Fix
whereonwin32andwhichelsewhere.installPath, sincewherecan return multiple matches (e.g.task-masterandtask-master.cmd).Testing
Verified on Windows 11 with
task-master-ai@0.43.1installed globally: the detection now resolvesisInstalled: truewith the correct install path and version. The non-Windows code path is unchanged (whichas before).🤖 Generated with Claude Code
Summary by CodeRabbit