Skip to content

Commit b8824c0

Browse files
committed
Merged PR 712890: Fix contract exception in ObservedInputAnalyzer
Fix contract exception in ObservedInputAnalyzer
1 parent 71d4ee0 commit b8824c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Public/Src/Tools/Execution.Analyzer/Analyzers.Core/ObservedInputAnalyzer.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ private static void WritePipJson(JsonWriter writer, global::BuildXL.Pips.Operati
7575
{
7676
writer.WriteStartObject();
7777
WriteJsonProperty(writer, "SemiStableHash", pip.FormattedSemiStableHash);
78-
WriteJsonProperty(writer, "Provenance", pip.Provenance.Usage.ToString(pipExecutionContext.PathTable));
78+
if (pip.Provenance.Usage.IsValid)
79+
{
80+
WriteJsonProperty(writer, "Provenance", pip.Provenance.Usage.ToString(pipExecutionContext.PathTable));
81+
}
7982
WriteJsonProperty(writer, "Type", pip.PipType.ToString());
8083
WriteJsonProperty(writer, "Description", pip.GetDescription(pipExecutionContext));
8184
writer.WriteEndObject();

0 commit comments

Comments
 (0)