Prerequisites
Cake runner
Cake .NET Tool
Cake version
5.0.0
Operating system
Windows
Operating system architecture
x64
CI Server
GitHub Actions
What are you seeing?
When you run a script that doesn't have any build issues, you get a nice summary of the output, including what was run, what was skipped, and how long each task took.
However, when you run a script that doesn't run to completion, due to an error occuring, the nice summary is not show, and as a result, it is not immediately clear what task has failed.
What is expected?
Regardless of whether the Cake script is successful, or if it contains an error, I always want to see the report summary, so I can immediately see what was executed, how long it took, what was skipped, etc.
Steps to Reproduce
- Run the following script and see the report summary shown
var target = Argument("target", "Test");
var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
.WithCriteria(c => HasArgument("rebuild"), "Just because!")
.Does(() =>
{
Information("Running Clean Task");
});
Task("Build")
.IsDependentOn("Clean")
.Does(() =>
{
//Information("Running build task");
});
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
Information("Running Test Task");
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);
- Run the following script and see the report summary not being shown
var target = Argument("target", "Test");
var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
.WithCriteria(c => HasArgument("rebuild"), "Just because!")
.Does(() =>
{
Information("Running Clean Task");
});
Task("Build")
.IsDependentOn("Clean")
.Does(() =>
{
//Information("Running build task");
});
Task("Test")
.IsDependentOn("Build")
.Does(() =>
{
throw new Exception("boom");
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);
Output log
NOTE: The following scripts outputs were created using the following setting in the cake.config file:
UseSpectreConsoleForConsoleOutput=true
When running the first script:
==================================================================================================
Build
==================================================================================================
==================================================================================================
Test
==================================================================================================
Running Test Task
Task Duration Skip Reason
────────────────────────────────────────────────────────────────────────────────────────────────────
Clean Skipped Just because!
Build 00:00:00.0535861
Test 00:00:00.0024934
────────────────────────────────────────────────────────────────────────────────────────────────────
Total: 00:00:00.0560795
And the screenshot version:

When running the second script:
==================================================================================================
Build
==================================================================================================
==================================================================================================
Test
==================================================================================================
An error occurred when executing task 'Test'.
Error: boom`
And then the screenshot version:

Prerequisites
Cake runner
Cake .NET Tool
Cake version
5.0.0
Operating system
Windows
Operating system architecture
x64
CI Server
GitHub Actions
What are you seeing?
When you run a script that doesn't have any build issues, you get a nice summary of the output, including what was run, what was skipped, and how long each task took.
However, when you run a script that doesn't run to completion, due to an error occuring, the nice summary is not show, and as a result, it is not immediately clear what task has failed.
What is expected?
Regardless of whether the Cake script is successful, or if it contains an error, I always want to see the report summary, so I can immediately see what was executed, how long it took, what was skipped, etc.
Steps to Reproduce
Output log
NOTE: The following scripts outputs were created using the following setting in the cake.config file:
When running the first script:
And the screenshot version:
When running the second script:
And then the screenshot version: