Skip to content

Commit efd9e7f

Browse files
authored
Merge pull request #6559 from ccastrotrejo/ccastrotrejo/dotnetExecPath
fix(vscode): Add dotnet executable path in list runtimes command
2 parents 70ae47e + b4a05ae commit efd9e7f

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
@@ -70,7 +70,8 @@ async function parseDotnetInfo(dotnetInfo: string, dotnetExecutablePath: string
7070
}
7171

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

0 commit comments

Comments
 (0)