public static async Task <ProcessOutput> Execute(this string bash, bool stripStdoutTrailingNewline = true, CancellationToken cancellationToken = default) { var(exitCode, stdOut, stdErr) = await ProcessExtensions.ExecuteBashViaTempFile(bash, includeMnt : PathsRequireMnt, cancellationToken); // if (exitCode != 0) // throw new BashNonzeroExitCodeException(exitCode); if (stripStdoutTrailingNewline) { stdOut = stdOut.TrimEnd('\n', '\r'); stdErr = stdErr.TrimEnd('\n', '\r'); } return(exitCode, stdOut, stdErr); }