diff --git a/.chronus/changes/fix-install-shell-2024-5-5-16-51-0.md b/.chronus/changes/fix-install-shell-2024-5-5-16-51-0.md new file mode 100644 index 0000000000..c4463be4fc --- /dev/null +++ b/.chronus/changes/fix-install-shell-2024-5-5-16-51-0.md @@ -0,0 +1,8 @@ +--- +# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking +changeKind: fix +packages: + - "@typespec/compiler" +--- + +Fix EINVAL error when running `tsp code install` diff --git a/packages/compiler/src/core/cli/utils.ts b/packages/compiler/src/core/cli/utils.ts index d1ae1666ad..7d4ada8310 100644 --- a/packages/compiler/src/core/cli/utils.ts +++ b/packages/compiler/src/core/cli/utils.ts @@ -86,6 +86,7 @@ export function run( const finalOptions: SpawnSyncOptionsWithStringEncoding = { encoding: "utf-8", stdio: "inherit", + shell: process.platform === "win32", ...(options ?? {}), };