Skip to content

Commit 0bfa8a6

Browse files
authored
Merge branch 'nuke-build:develop' into azure-authenticate
2 parents 957c26e + 3109f4c commit 0bfa8a6

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

source/Nuke.Tooling/Configure.cs

+11-4
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,17 @@ private static IReadOnlyCollection<TResult> Invoke<TSettings, TResult>(
106106
invocations
107107
.Where(x => x.Settings.ProcessLogOutput ?? ProcessTasks.DefaultLogOutput)
108108
.SelectMany(x =>
109-
x.Exception is not ProcessException processException
110-
? outputSelector(x.Result)
111-
: processException.Process.Output)
112-
.ForEach(x => logger(x.Type, x.Text));
109+
{
110+
var (settings, result, exception) = x;
111+
var output = exception switch
112+
{
113+
ProcessException processException => processException.Process.Output,
114+
_ => outputSelector(result),
115+
};
116+
117+
return output.Select(x => (Logger: logger ?? settings.ProcessLogger, Line: x));
118+
})
119+
.ForEach(x => x.Logger(x.Line.Type, x.Line.Text));
113120
}
114121
}
115122
}

source/Nuke.Tooling/NuGetPackageResolver.cs

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public static InstalledPackage GetGlobalInstalledPackage(
211211
// packages can contain false positives due to present/missing version specification
212212
.Where(x => x.Id.EqualsOrdinalIgnoreCase(packageId))
213213
.Where(x => !x.Version.IsPrerelease || !includePrereleases.HasValue || includePrereleases.Value)
214+
.Distinct(x => x.Directory)
214215
.OrderByDescending(x => x.Version)
215216
.ToList();
216217

0 commit comments

Comments
 (0)