Launch AutoRest correctly on Windows

This commit is contained in:
David Wilson (AZURE SDK) 2021-01-22 11:54:27 -08:00
Родитель e5118270f2
Коммит 7a71fdc46f
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -94,7 +94,10 @@ async function main() {
// Execute AutoRest on the output file
// TODO: Parameterize client language selection
spawnSync("autorest", [
spawnSync(
process.platform === "win32"
? "autorest.cmd"
: "autorest", [
"--version:3.0.6367",
"--typescript",
`--clear-output-folder=true`,
@ -102,7 +105,8 @@ async function main() {
`--title=AdlClient`,
`--input-file=${options.swaggerOutputFile}`
], {
stdio: 'inherit'
stdio: 'inherit',
shell: true
});
}
}