| ... | ... | @@ -533,10 +533,16 @@ pub fn run(gpa: Allocator, io: Io, options: RunOptions) RunError!RunResult { |
| 533 | 533 | |
| 534 | 534 | try child.collectOutput(gpa, &stdout, &stderr, options.max_output_bytes); |
| 535 | 535 | |
| 536 | const term = try child.wait(io); |
| 537 | |
| 538 | const owned_stdout = try stdout.toOwnedSlice(gpa); |
| 539 | errdefer gpa.free(owned_stdout); |
| 540 | const owned_stderr = try stderr.toOwnedSlice(gpa); |
| 541 | |
| 536 | 542 | return .{ |
| 537 | | .stdout = try stdout.toOwnedSlice(gpa), |
| 538 | | .stderr = try stderr.toOwnedSlice(gpa), |
| 539 | | .term = try child.wait(io), |
| 543 | .stdout = owned_stdout, |
| 544 | .stderr = owned_stderr, |
| 545 | .term = term, |
| 540 | 546 | }; |
| 541 | 547 | } |
| 542 | 548 | |