Skip to content

Commit

Permalink
Merge pull request #6559 from ccastrotrejo/ccastrotrejo/dotnetExecPath
Browse files Browse the repository at this point in the history
fix(vscode): Add dotnet executable path in list runtimes command
  • Loading branch information
dibarbet authored Oct 18, 2023
2 parents 70ae47e + b4a05ae commit efd9e7f
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 @@ -70,7 +70,8 @@ async function parseDotnetInfo(dotnetInfo: string, dotnetExecutablePath: string
}

const runtimeVersions: { [runtime: string]: RuntimeInfo[] } = {};
const listRuntimes = await execChildProcess('dotnet --list-runtimes', process.cwd(), process.env);
const command = dotnetExecutablePath ? `"${dotnetExecutablePath}"` : 'dotnet';
const listRuntimes = await execChildProcess(`${command} --list-runtimes`, process.cwd(), process.env);
lines = listRuntimes.split(/\r?\n/);
for (const line of lines) {
let match: RegExpMatchArray | null;
Expand Down

0 comments on commit efd9e7f

Please sign in to comment.