Skip to content

Commit

Permalink
Fix dotnet info when the dotnet path contains spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Sep 11, 2023
1 parent 097b7ed commit bcae4d5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/shared/utils/getDotnetInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ async function runDotnetInfo(dotnetExecutablePath: string | undefined): Promise<
...process.env,
DOTNET_CLI_UI_LANGUAGE: 'en-US',
};
const data = await execChildProcess(`${dotnetExecutablePath ?? 'dotnet'} --info`, process.cwd(), env);
const command = dotnetExecutablePath ? `"${dotnetExecutablePath}"` : 'dotnet';
const data = await execChildProcess(`${command} --info`, process.cwd(), env);
return data;
} catch (error) {
const message = error instanceof Error ? error.message : `${error}`;
Expand Down

0 comments on commit bcae4d5

Please sign in to comment.