Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add overload to WithCriteria which prints a message #1594

Closed
pascalberger opened this issue May 4, 2017 · 5 comments
Closed

Add overload to WithCriteria which prints a message #1594

pascalberger opened this issue May 4, 2017 · 5 comments
Labels
Milestone

Comments

@pascalberger
Copy link
Member

It would be nice to have an overload of the WithCriteria extension which takes a message which will be printed out in case of the criteria being false, additionally to the Skipping task: xy text. This would allow to give some information why a task was skipped to the user.

@fatmanmclone90
Copy link

this would be really useful, the current stack trace tells you nothing about why it aborted

@patriksvensson
Copy link
Member

Excellent idea!

@pleb
Copy link

pleb commented Oct 20, 2017

Yeah. I end up doing validation in the task because I can't print a custom message. I would rather use WithCriteria

@patriksvensson patriksvensson added this to the v0.28.0 milestone May 21, 2018
devlead added a commit to devlead/cake that referenced this issue May 28, 2018
* Releates to cake-build#2008, cake-build#1594 and cake-build#1772
* Changes Setup from ICakeContext to ISetupContext
* Adds target/initating task as TargetTask on ISetupContext
* Adds typed context WithCriteria CakeTaskBuilder extension methods
* Adds integration tests for ISetupContext/TData Setup and typed WithCriteria
devlead added a commit to devlead/cake that referenced this issue May 28, 2018
* Relates to cake-build#2008, cake-build#1594 and cake-build#1772
* Changes Setup from ICakeContext to ISetupContext
* Adds target/initating task as TargetTask on ISetupContext
* Adds typed context WithCriteria CakeTaskBuilder extension methods
* Adds integration tests for ISetupContext/TData Setup and typed WithCriteria
@gtbuchanan
Copy link
Contributor

I'm seeing this was included with v0.28, but I'm using v0.30 on Windows and it's not showing the custom messages... Is there some sort of configuration I need to turn on?

@devlead
Copy link
Member

devlead commented Oct 25, 2018

@gtbuchanan the task message is written with Verbose verbosity, so you need to launch Cake with Verbose or Diagnostic verbosity to see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants