Skip to content

Commit f9fe883

Browse files
committed
Cleanup
1 parent 39f7589 commit f9fe883

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

source/Nuke.Common/Execution/Telemetry.Events.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ public static void BuildStarted(NukeBuild build)
2525

2626
public static void TargetSucceeded(ExecutableTarget target, NukeBuild build)
2727
{
28-
if (target.Name.EqualsAnyOrdinalIgnoreCase(s_knownTargets) &&
29-
target.Status == ExecutionStatus.Succeeded)
30-
{
31-
TrackEvent(
32-
eventName: nameof(TargetSucceeded),
33-
propertiesProvider: () =>
34-
GetCommonProperties(build)
35-
.AddDictionary(GetTargetProperties(build, target))
36-
.AddDictionary(GetBuildProperties(build))
37-
.AddDictionary(GetRepositoryProperties(NukeBuild.RootDirectory)));
38-
}
28+
if (!target.Name.EqualsAnyOrdinalIgnoreCase(s_knownTargets) ||
29+
target.Status != ExecutionStatus.Succeeded)
30+
return;
31+
32+
TrackEvent(
33+
eventName: nameof(TargetSucceeded),
34+
propertiesProvider: () =>
35+
GetCommonProperties(build)
36+
.AddDictionary(GetTargetProperties(build, target))
37+
.AddDictionary(GetBuildProperties(build))
38+
.AddDictionary(GetRepositoryProperties(NukeBuild.RootDirectory)));
3939
}
4040

4141
public static void ConfigurationGenerated(Type hostType, string generatorId, NukeBuild build)

0 commit comments

Comments
 (0)