Skip to content

Commit

Permalink
Clarify the return type of Process.run when encoding is null
Browse files Browse the repository at this point in the history
Being able to expect a Uint8List allows more efficient processing of
output.

Change-Id: Idf6fd6c581912e1958439d95790960f16fe549e6
CoreLibraryReviewExempt: This is a documentation-only change, describing existing behavior. It is VM-only (dart:io) and has approval from the owner of dart:io
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383940
Commit-Queue: Sigurd Meldgaard <[email protected]>
Reviewed-by: Lasse Nielsen <[email protected]>
Reviewed-by: Brian Quinlan <[email protected]>
Reviewed-by: Nate Bosch <[email protected]>
  • Loading branch information
sigurdm authored and Commit Queue committed Sep 10, 2024
1 parent 6903672 commit a57e604
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions sdk/lib/io/process.dart
Original file line number Diff line number Diff line change
Expand Up @@ -552,16 +552,18 @@ final class ProcessResult {
/// value.
final int exitCode;

/// Standard output from the process. The value used for the
/// `stdoutEncoding` argument to `Process.run` determines the type. If
/// `null` was used, this value is of type `List<int>` otherwise it is
/// of type `String`.
/// Standard output from the process.
///
/// The value used for the `stdoutEncoding` argument to [Process.run]
/// determines the type. If `null` was used, this value is of type
/// [Uint8List] otherwise it is of type `String`.
final stdout;

/// Standard error from the process. The value used for the
/// `stderrEncoding` argument to `Process.run` determines the type. If
/// `null` was used, this value is of type `List<int>`
/// otherwise it is of type `String`.
/// Standard error from the process.
///
/// The value used for the `stderrEncoding` argument to [Process.run]
/// determines the type. If `null` was used, this value is of type
/// [Uint8List] otherwise it is of type [String].
final stderr;

/// Process id of the process.
Expand Down

0 comments on commit a57e604

Please sign in to comment.