Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Make encoding parameter nullable #65

Merged
merged 2 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 4.2.2

* Mark `stderrEncoding` and `stdoutEncoding` parameters as nullable.

#### 4.2.1

* Added custom exception types `ProcessPackageException` and
Expand Down
8 changes: 4 additions & 4 deletions lib/src/interface/local_process_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ class LocalProcessManager implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) {
try {
return Process.run(
Expand Down Expand Up @@ -98,8 +98,8 @@ class LocalProcessManager implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) {
try {
return Process.runSync(
Expand Down
10 changes: 6 additions & 4 deletions lib/src/interface/process_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ abstract class ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
// TODO(#64): Remove the `covariant` keyword.
covariant Encoding? stdoutEncoding = systemEncoding,
covariant Encoding? stderrEncoding = systemEncoding,
});

/// Starts a process and runs it to completion. This is a synchronous
Expand All @@ -158,8 +159,9 @@ abstract class ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
// TODO(#64): Remove the `covariant` keyword.
covariant Encoding? stdoutEncoding = systemEncoding,
covariant Encoding? stderrEncoding = systemEncoding,
});

/// Returns `true` if the [executable] exists and if it can be executed.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: process
version: 4.2.1
version: 4.2.2
description: A pluggable, mockable process invocation abstraction for Dart.
homepage: https://github.com/google/process.dart

Expand Down