Tool.Run should make stdout and stderr available on failure
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 778
- Avg merge
- 3h 37m
- Merged PRs (30d)
- 21
Description
Tool.Run and related should make stdout and stderr available so that some analysis is possible on failure. Currently it calls [ProcessExitCode](https://github.com/cake-build/cake/blob/develop/src/Cake.Core/Tooling/Tool.cs#L119) which [throws](https://github.com/cake-build/cake/blob/develop/src/Cake.Core/Tooling/Tool.cs#L139) a simple `CakeException`.
Ideally, it would capture stdout and stderr and throw a `CakeProcessException`, or similar, that has additional properties for exit code, stdout and stderr.
Contributor guide
Research direction
Start in src/Cake.Core/Tooling/Tool.cs at ProcessExitCode around lines 119 and 139, and trace how Tool.Run handles failed processes. Define the failure result around the requested CakeProcessException or similar, preserving exit code, stdout, and stderr so callers can inspect them after failure. Done means failed tool execution exposes all three values instead of only a simple CakeException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100