Code quality improvement

This commit is contained in:
Tamas Vajk
2024-04-22 15:07:06 +02:00
parent 05f3c64172
commit f20812d8ad

View File

@@ -55,14 +55,14 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
private string? GetCscPath()
{
var newestSdkVersion = GetNewestSdkVersion();
if (newestSdkVersion is null)
var version = Version;
if (version is null)
{
logger.LogWarning("No dotnet SDK found.");
return null;
}
var path = Path.Combine(newestSdkVersion.FullPath, "Roslyn", "bincore", "csc.dll");
var path = Path.Combine(version.FullPath, "Roslyn", "bincore", "csc.dll");
logger.LogDebug($"Source generator CSC: '{path}'");
if (!File.Exists(path))
{