Skip to content

Commit 3d66265

Browse files
committed
Log unmatched assets only when there are any
1 parent a96232f commit 3d66265

File tree

1 file changed

+6
-4
lines changed
  • src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks

1 file changed

+6
-4
lines changed

src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/JoinVerticals.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ public override bool Execute()
5050
List<AssetVerticalMatchResult> selectedVerticals = joinVerticalsAssetSelector.SelectAssetMatchingVertical(manifests).ToList();
5151

5252
var notMatchedAssets = selectedVerticals.Where(o => o.MatchType == AssetVerticalMatchType.NotSpecified).ToList();
53-
Log.LogError($"### {notMatchedAssets.Count} Assets not properly matched to vertical: ###");
54-
foreach (var matchResult in notMatchedAssets)
53+
if (notMatchedAssets.Count > 0)
5554
{
56-
Log.LogMessage(MessageImportance.High, $"Asset: {matchResult.AssetId} -- Matched to: {matchResult.VerticalName}, Other verticals: {string.Join(", ", matchResult.OtherVerticals)}");
55+
Log.LogError($"### {notMatchedAssets.Count} Assets not properly matched to vertical: ###");
56+
foreach (var matchResult in notMatchedAssets)
57+
{
58+
Log.LogMessage(MessageImportance.High, $"Asset: {matchResult.AssetId} -- Matched to: {matchResult.VerticalName}, Other verticals: {string.Join(", ", matchResult.OtherVerticals)}");
59+
}
5760
}
58-
5961
// save manifest and download all the assets
6062
string packagesOutputDirectory = Path.Combine(OutputFolder, _packagesFolderName);
6163
ForceDirectory(packagesOutputDirectory);

0 commit comments

Comments
 (0)