C#: Verify that downloaded .NET CLIs are executable

This commit is contained in:
Tom Hvitved
2025-01-24 15:13:27 +01:00
parent dcd87a9825
commit ac4f82cfbb
4 changed files with 24 additions and 9 deletions

View File

@@ -46,7 +46,9 @@ namespace Semmle.Autobuild.CSharp
return WithDotNet(builder, ensureDotNetAvailable: false, (dotNetPath, environment) =>
{
var ret = GetInfoCommand(builder.Actions, dotNetPath, environment);
// When a custom .NET CLI has been installed, `dotnet --info` has already been executed
// to verify the installation.
var ret = dotNetPath is null ? GetInfoCommand(builder.Actions, dotNetPath, environment) : BuildScript.Success;
foreach (var projectOrSolution in builder.ProjectsOrSolutionsToBuild)
{
var cleanCommand = GetCleanCommand(builder.Actions, dotNetPath, environment);