Windows: MCP entries start through cmd /c npx or bun cli/index.ts (npx.cmd and the sh launcher cannot be spawned, pitfall 94); desktop download streams with progress and fails after 60 s without data (pitfall 95); getting-started Windows note
This commit is contained in:
parent
e5dffb5533
commit
0ac3cd02b0
6 changed files with 77 additions and 9 deletions
|
|
@ -455,21 +455,24 @@ describe('install', () => {
|
|||
const vs = JSON.parse(readFileSync(join(dir, '.vscode/mcp.json'), 'utf8'));
|
||||
expect(Object.keys(vs.servers)).toEqual(['keep', 'storebound']);
|
||||
expect(readFileSync(join(dir, '.codex/config.toml'), 'utf8')).toContain('[mcp_servers.storebound]');
|
||||
expect(JSON.parse(readFileSync(join(home, '.config/devin/mcp_config.json'), 'utf8')).mcpServers.storebound.args).toEqual(['mcp']);
|
||||
expect(JSON.parse(readFileSync(join(home, '.config/devin/mcp_config.json'), 'utf8')).mcpServers.storebound.args.at(-1)).toBe('mcp');
|
||||
const before = readFileSync(join(dir, '.vscode/mcp.json'), 'utf8');
|
||||
await install(parseArgs(['--agent', 'copilot', '--dir', dir, '--home', home]));
|
||||
expect(readFileSync(join(dir, '.vscode/mcp.json'), 'utf8')).toBe(before);
|
||||
});
|
||||
test('mcp command choice', () => {
|
||||
const dir = tmp();
|
||||
expect(mcpCommand(dir).command).toMatch(/bin\/storebound$/);
|
||||
expect(mcpCommand(dir, undefined, 'bun', undefined, 'linux').command).toMatch(/bin[\\/]storebound$/);
|
||||
expect(mcpCommand(dir, undefined, 'bun', undefined, 'win32')).toEqual({ command: 'bun', args: [expect.stringMatching(/cli[\\/]index\.ts$/), 'mcp'] });
|
||||
// run with Node (npx storebound install): the toolchain sits in npx's cache, so the pinned package instead
|
||||
expect(mcpCommand(dir, undefined, 'node', '1.2.3')).toEqual({ command: 'npx', args: ['-y', 'storebound@1.2.3', 'mcp'] });
|
||||
expect(mcpCommand(dir, undefined, 'node', '1.2.3', 'linux')).toEqual({ command: 'npx', args: ['-y', 'storebound@1.2.3', 'mcp'] });
|
||||
mkdirSync(join(dir, 'node_modules/storebound'), { recursive: true });
|
||||
writeFileSync(join(dir, 'node_modules/storebound/package.json'), '{}');
|
||||
expect(mcpCommand(dir)).toEqual({ command: 'bunx', args: ['storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, undefined, 'node')).toEqual({ command: 'npx', args: ['storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, 'npx -y storebound')).toEqual({ command: 'npx', args: ['-y', 'storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, undefined, 'node', undefined, 'linux')).toEqual({ command: 'npx', args: ['storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, 'npx -y storebound', undefined, undefined, 'linux')).toEqual({ command: 'npx', args: ['-y', 'storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, 'npx -y storebound', undefined, undefined, 'win32')).toEqual({ command: 'cmd', args: ['/c', 'npx', '-y', 'storebound', 'mcp'] });
|
||||
expect(mcpCommand(dir, undefined, 'bun', undefined, 'win32').command).not.toBe('cmd');
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue