Skip to content

Commit bcae4d5

Browse files
committed
Fix dotnet info when the dotnet path contains spaces
1 parent 097b7ed commit bcae4d5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shared/utils/getDotnetInfo.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ async function runDotnetInfo(dotnetExecutablePath: string | undefined): Promise<
3939
...process.env,
4040
DOTNET_CLI_UI_LANGUAGE: 'en-US',
4141
};
42-
const data = await execChildProcess(`${dotnetExecutablePath ?? 'dotnet'} --info`, process.cwd(), env);
42+
const command = dotnetExecutablePath ? `"${dotnetExecutablePath}"` : 'dotnet';
43+
const data = await execChildProcess(`${command} --info`, process.cwd(), env);
4344
return data;
4445
} catch (error) {
4546
const message = error instanceof Error ? error.message : `${error}`;

0 commit comments

Comments
 (0)