You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArgumentException when static and dynamic conditions of an invoked target are violated.
The invoked target is not marked as skipped after the evaluation of its static conditions (but the SummaryInformation for OnlyWhen is added).
When the target is executed and its dynamic conditions are evaluated the SummaryInformation for OnlyWhen is added again which throws: System.ArgumentException: An item with the same key has already been added. Key: OnlyWhen
Reproduction Steps
using Nuke.Common;
class Build : NukeBuild
{
public static int Main () => Execute<Build>(x => x.Repro);
Target Repro => _ => _
.OnlyWhenStatic(() => false, "static")
.OnlyWhenDynamic(() => false, "dynamic");
}
Expected Behavior
No Exception. Target is skipped.
Actual Behavior
Regression?
No response
Known Workarounds
Only use static OR dynamic conditions for target.
Could you help with a pull-request?
No
The text was updated successfully, but these errors were encountered:
Usage Information
8.0.0 / 8.0.202 / net8.0 / windows10
Description
ArgumentException when static and dynamic conditions of an invoked target are violated.
The invoked target is not marked as skipped after the evaluation of its static conditions (but the SummaryInformation for OnlyWhen is added).
When the target is executed and its dynamic conditions are evaluated the SummaryInformation for OnlyWhen is added again which throws:
System.ArgumentException: An item with the same key has already been added. Key: OnlyWhen
Reproduction Steps
Expected Behavior
No Exception. Target is skipped.
Actual Behavior
Regression?
No response
Known Workarounds
Only use static OR dynamic conditions for target.
Could you help with a pull-request?
No
The text was updated successfully, but these errors were encountered: