diff --git a/StabilityMatrix.Core/Processes/ProcessResult.cs b/StabilityMatrix.Core/Processes/ProcessResult.cs index 9fca6171..509f7ab1 100644 --- a/StabilityMatrix.Core/Processes/ProcessResult.cs +++ b/StabilityMatrix.Core/Processes/ProcessResult.cs @@ -22,3 +22,13 @@ public readonly record struct ProcessResult } } } + +public static class ProcessResultTaskExtensions +{ + public static async Task EnsureSuccessExitCode(this Task task) + { + var result = await task.ConfigureAwait(false); + result.EnsureSuccessExitCode(); + return result; + } +}