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

Commit

Permalink
Make encoding parameter nullable (again) (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
lambda-fairy authored Oct 18, 2021
1 parent 50921c3 commit 2546dfe
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#### 4.2.4

* Mark `stderrEncoding` and `stdoutEncoding` parameters as nullable again,
now that the upstream SDK issue has been fixed.

#### 4.2.3

* Rollback to version 4.2.1 (https://github.com/google/process.dart/issues/64)
Expand Down
10 changes: 4 additions & 6 deletions lib/src/interface/local_process_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import 'dart:io'
ProcessException,
systemEncoding;

import 'package:process/process.dart';

import 'common.dart';
import 'exceptions.dart';
import 'process_manager.dart';
Expand Down Expand Up @@ -67,8 +65,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 +96,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
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: process
version: 4.2.3
version: 4.2.4
description: A pluggable, mockable process invocation abstraction for Dart.
homepage: https://github.com/google/process.dart

environment:
sdk: '>=2.12.0-0 <3.0.0'
sdk: '>=2.14.0-0 <3.0.0'

dependencies:
file: '^6.0.0'
Expand Down

0 comments on commit 2546dfe

Please sign in to comment.