Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/winapp-CLI/WinApp.Cli/Services/BuildToolsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,22 @@ public async Task<FileInfo> EnsureBuildToolAvailableAsync(string toolName, Cance

if (p.ExitCode != 0)
{
// Print lines from both stdout and stderr when not in verbose mode so the user can determine
// what went wrong.
// In verbose mode, all output is already visible via LogDebug above.
if (!logger.IsEnabled(LogLevel.Debug))
{
if (!string.IsNullOrWhiteSpace(stdout))
{
logger.LogError("{Stdout}", stdout);
}

if (!string.IsNullOrWhiteSpace(stderr))
{
logger.LogError("{StdErr}", stderr);
}
}

throw new InvalidBuildToolException(p.Id, stdout, stderr, $"{toolName} execution failed with exit code {p.ExitCode}");
}

Expand Down