Skip to content

Commit

Permalink
replace installationName with installationVersion for VisualStudioRes…
Browse files Browse the repository at this point in the history
…olver
  • Loading branch information
rainyl committed Feb 17, 2025
1 parent 71d5b7d commit 7003157
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkgs/native_toolchain_c/lib/src/native_toolchain/msvc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@ class VisualStudioResolver implements ToolResolver {
for (final vswhereInstance in vswhereInstances.take(1)) {
final vswhereResult = await runProcess(
executable: vswhereInstance.uri,
arguments: ['-format', 'json', '-utf8', '-latest', '-products', '*'],
arguments: ['-format', 'json', '-latest', '-products', '*'],
logger: logger,
);
final toolInfos = json.decode(vswhereResult.stdout) as List;
for (final toolInfo in toolInfos) {
final toolInfoParsed = toolInfo as Map<String, Object?>;
if (toolInfoParsed['installationPath'] != null &&
toolInfoParsed['installationName'] != null) {
toolInfoParsed['installationVersion'] != null) {
final dir = Directory(toolInfoParsed['installationPath']! as String);
assert(await dir.exists());
final uri = dir.uri;
final version = versionFromString(
toolInfoParsed['installationName']! as String,
toolInfoParsed['installationVersion']! as String,
);
final instance = ToolInstance(
tool: visualStudio,
Expand Down

0 comments on commit 7003157

Please sign in to comment.