Skip to content

Commit

Permalink
Merge branch 'nuke-build:develop' into azure-authenticate
Browse files Browse the repository at this point in the history
  • Loading branch information
ITDancer13 authored Jul 12, 2024
2 parents 957c26e + 3109f4c commit 0bfa8a6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions source/Nuke.Tooling/Configure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,17 @@ private static IReadOnlyCollection<TResult> Invoke<TSettings, TResult>(
invocations
.Where(x => x.Settings.ProcessLogOutput ?? ProcessTasks.DefaultLogOutput)
.SelectMany(x =>
x.Exception is not ProcessException processException
? outputSelector(x.Result)
: processException.Process.Output)
.ForEach(x => logger(x.Type, x.Text));
{
var (settings, result, exception) = x;
var output = exception switch
{
ProcessException processException => processException.Process.Output,
_ => outputSelector(result),
};

return output.Select(x => (Logger: logger ?? settings.ProcessLogger, Line: x));
})
.ForEach(x => x.Logger(x.Line.Type, x.Line.Text));
}
}
}
Expand Down
1 change: 1 addition & 0 deletions source/Nuke.Tooling/NuGetPackageResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ public static InstalledPackage GetGlobalInstalledPackage(
// packages can contain false positives due to present/missing version specification
.Where(x => x.Id.EqualsOrdinalIgnoreCase(packageId))
.Where(x => !x.Version.IsPrerelease || !includePrereleases.HasValue || includePrereleases.Value)
.Distinct(x => x.Directory)
.OrderByDescending(x => x.Version)
.ToList();

Expand Down

0 comments on commit 0bfa8a6

Please sign in to comment.