Skip to content

Cake Frosting WithCriteria Description #4517

@tstewart65

Description

@tstewart65

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

Cake runner

Cake Frosting

Cake version

5.0

Operating system

Windows

Operating system architecture

x64

CI Server

No response

What are you seeing?

The fix implemented in #4027 does not seem to work as implemented. The SkippedMessage property was added to IFrostingTask and it was also implemented there to return an empty string. IFrostingTask is implemented in FrostingTask but it has nothing in there to allow you to change the SkippedMessage property. This is the only level where you can change the SkippedMessage property and have it picked up when trying to reference it using IFrostingTask. I added a SkippedMessage property to my CleanTask I was creating and the message was not used when the following is called in FrostingEngine

// Is the criteria method overridden?
if (task.IsShouldRunOverridden(_context))
{
      cakeTask.WithCriteria(task.ShouldRun, task.SkippedMessage);
}

I made a small test project to verify this. Unless I am missing something I think this needs changed.

What is expected?

Want to be able to set the skipped message for the WithCriteria like you can when using Cake Tool.

Steps to Reproduce

Just try to set the SkippedMessage so it can be used when using the ShouldRun override.

Output log

No error log to show the message does not show up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions