Fix workflow MCP bundled CLI lookup in tests
This commit is contained in:
parent
c19830b702
commit
b573af4828
1 changed files with 10 additions and 4 deletions
|
|
@ -70,10 +70,16 @@ function lookupCommand(command: string, platform: NodeJS.Platform = process.plat
|
|||
function getBundledWorkflowMcpCliPath(env: NodeJS.ProcessEnv): string | null {
|
||||
if (!env.GSD_BIN_PATH?.trim() && !env.GSD_CLI_PATH?.trim()) return null;
|
||||
|
||||
const bundledCli = resolve(
|
||||
fileURLToPath(new URL("../../../../packages/mcp-server/dist/cli.js", import.meta.url)),
|
||||
);
|
||||
return existsSync(bundledCli) ? bundledCli : null;
|
||||
const candidates = [
|
||||
resolve(fileURLToPath(new URL("../../../../packages/mcp-server/dist/cli.js", import.meta.url))),
|
||||
resolve(fileURLToPath(new URL("../../../../../packages/mcp-server/dist/cli.js", import.meta.url))),
|
||||
];
|
||||
|
||||
for (const bundledCli of candidates) {
|
||||
if (existsSync(bundledCli)) return bundledCli;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export function detectWorkflowMcpLaunchConfig(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue