fix(mcp): fall back to lane cwd when source_repo is null
Adopted lanes have source_repo = null; lane-mcp.js passed it raw to readSourceMcpServers and threw ENOMCPCONFIG. Match the existing fallback pattern in lane-env.js/lane-profile.js.
This commit is contained in:
@@ -120,8 +120,9 @@ function excludeFromGit(laneDir, line) {
|
||||
* @returns {{servers: string[], profilesSeeded: string[]}}
|
||||
*/
|
||||
async function syncMcp(lane) {
|
||||
const sourceServers = readSourceMcpServers(lane.source_repo);
|
||||
const relocated = relocate(sourceServers, lane.source_repo, lane.cwd);
|
||||
const sourceRepo = lane.source_repo || lane.cwd;
|
||||
const sourceServers = readSourceMcpServers(sourceRepo);
|
||||
const relocated = relocate(sourceServers, sourceRepo, lane.cwd);
|
||||
pinPlaywrightOutputDir(relocated, lane.cwd);
|
||||
|
||||
fs.writeFileSync(
|
||||
@@ -130,7 +131,7 @@ async function syncMcp(lane) {
|
||||
);
|
||||
excludeFromGit(lane.cwd, ".mcp.json");
|
||||
|
||||
const profilesSeeded = seedProfiles(lane.source_repo, lane.cwd);
|
||||
const profilesSeeded = seedProfiles(sourceRepo, lane.cwd);
|
||||
|
||||
return { servers: Object.keys(relocated), profilesSeeded };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user