fix(installer): accept windows custom module paths#2511
Conversation
🤖 Augment PR SummarySummary: This PR fixes custom-module source parsing so Windows-shaped local paths are recognized as local sources instead of being misrouted to Git URL parsing. Changes:
Technical Notes: Uses 🤖 Was this summary useful? React with 👍 or 👎 |
📝 WalkthroughWalkthroughThe PR adds a shared local-path detector in ChangesInstaller source parsing
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/installer/modules/custom-module-manager.js`:
- Around line 112-113: The `@version` parser in custom-module-manager still uses
the older beforeLooksLikeRepo check, so Windows and relative local paths can
bypass the local-path suffix error. Update the parser to reuse the shared
isLocalSourcePath predicate in the same way the local branch does, and ensure
parseSource rejects any local path with an `@version` suffix by returning the
existing “Local paths do not support `@version` suffixes” error instead of
treating it as a literal path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8c51cf2c-3d77-472f-a69b-e1a69aa0628c
📒 Files selected for processing (2)
test/test-parse-source-urls.jstools/installer/modules/custom-module-manager.js
What
Custom module source parsing now accepts Windows local paths such as
C:\modules\foo,C:/modules/foo, and.\foo.Why
Windows-style local paths such as
C:\projects\ai\BMAD-METHODfell through to the Git URL parser and were rejected as invalid, even though slash-style paths like/projects/ai/BMAD-METHODalready worked.How
Testing
Ran
npm run lint,npm run test:urls, andnode test/test-installation-components.js; all passed.