Added error output handling in UpdateMetadataCommands

This commit is contained in:
Thorsten Sommer 2025-04-14 11:32:58 +02:00
parent f1b5b9e350
commit e161164e21
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -279,6 +279,7 @@ public sealed partial class UpdateMetadataCommands
FileName = program, FileName = program,
Arguments = command, Arguments = command,
RedirectStandardOutput = true, RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false, UseShellExecute = false,
CreateNoWindow = true CreateNoWindow = true
}; };
@ -288,9 +289,13 @@ public sealed partial class UpdateMetadataCommands
process.Start(); process.Start();
var output = await process.StandardOutput.ReadToEndAsync(); var output = await process.StandardOutput.ReadToEndAsync();
var error = await process.StandardError.ReadToEndAsync();
await process.WaitForExitAsync(); await process.WaitForExitAsync();
return output; return $"""
{output}
{error}
""";
} }
private async Task IncreaseBuildNumber() private async Task IncreaseBuildNumber()