Skip to content

Commit b4a05ae

Browse files
committed
Add dotnet executable path in list runtimes command
1 parent ba8e118 commit b4a05ae

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)