Browse Source

Refactor `DotnetSdkDetector`: replace command execution with `Environment.Version` for SDK version detection.

pull/23059/head
Emre KARA 1 year ago
parent
commit
4ec3d4c147
  1. 8
      framework/src/Volo.Abp.Core/Volo/Abp/Telemetry/EnvironmentInspection/Detectors/DotnetSdkDetector.cs

8
framework/src/Volo.Abp.Core/Volo/Abp/Telemetry/EnvironmentInspection/Detectors/DotnetSdkDetector.cs

@ -12,12 +12,6 @@ internal class DotnetSdkDetector : SoftwareDetector
public async override Task<SoftwareInfo?> DetectAsync()
{
var output = await ExecuteCommandAsync("dotnet", "--version");
if (output.IsNullOrWhiteSpace())
{
return null;
}
return new SoftwareInfo(Name, output, null, SoftwareType.DotnetSdk);
return new SoftwareInfo(Name, Environment.Version.ToString(), null, SoftwareType.DotnetSdk);
}
}
Loading…
Cancel
Save