Skip to content

Commit

Permalink
Merge pull request #6334 from dibarbet/dotnetinfo_spaces
Browse files Browse the repository at this point in the history
Fix dotnet info when the dotnet path contains spaces
  • Loading branch information
dibarbet authored Sep 11, 2023
2 parents 17ef56a + bcae4d5 commit d23fda4
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 d23fda4

Please sign in to comment.