test(teams): run cmd mcp preflight through shell on Windows
This commit is contained in:
parent
1c5fce5f0a
commit
e20d74d95e
1 changed files with 6 additions and 1 deletions
|
|
@ -224,7 +224,12 @@ function spawnRealCli(
|
|||
args: readonly string[],
|
||||
options?: Parameters<typeof spawn>[2]
|
||||
) {
|
||||
return options ? spawn(command, [...args], options) : spawn(command, [...args]);
|
||||
const spawnOptions = options ?? {};
|
||||
const needsWindowsCommandShell = process.platform === 'win32' && /\.(bat|cmd)$/i.test(command);
|
||||
return spawn(command, [...args], {
|
||||
...spawnOptions,
|
||||
...(needsWindowsCommandShell ? { shell: true } : {}),
|
||||
});
|
||||
}
|
||||
|
||||
async function removeTempRoot(dirPath: string): Promise<void> {
|
||||
|
|
|
|||
Loading…
Reference in a new issue