Unverified Commit 7ef52267 authored by Chris Wong's avatar Chris Wong Committed by GitHub

Migrate to `process` 4.2.4 (#92630)

parent 6b93dc5c
......@@ -682,8 +682,8 @@ class FakeProcessManager extends Fake implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) async {
workingDirectories.add(workingDirectory);
final ProcessResult? result = processResults[RunInvocation(command.cast<String>(), workingDirectory)];
......
......@@ -662,8 +662,8 @@ class ErrorHandlingProcessManager extends ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding,
Encoding? stdoutEncoding = io.systemEncoding,
Encoding? stderrEncoding = io.systemEncoding,
}) {
return _run(() {
return _delegate.run(
......@@ -705,8 +705,8 @@ class ErrorHandlingProcessManager extends ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding,
Encoding? stdoutEncoding = io.systemEncoding,
Encoding? stderrEncoding = io.systemEncoding,
}) {
return _runSync(() {
return _delegate.runSync(
......
......@@ -108,7 +108,7 @@ class FakeCommand {
List<String> command,
String? workingDirectory,
Map<String, String>? environment,
Encoding encoding,
Encoding? encoding,
) {
expect(command, equals(this.command));
if (this.workingDirectory != null) {
......@@ -244,7 +244,7 @@ abstract class FakeProcessManager implements ProcessManager {
List<String> command,
String? workingDirectory,
Map<String, String>? environment,
Encoding encoding,
Encoding? encoding,
);
int _pid = 9999;
......@@ -253,7 +253,7 @@ abstract class FakeProcessManager implements ProcessManager {
List<String> command,
String? workingDirectory,
Map<String, String>? environment,
Encoding encoding,
Encoding? encoding,
) {
_pid += 1;
final FakeCommand fakeCommand = findCommand(command, workingDirectory, environment, encoding);
......@@ -301,8 +301,8 @@ abstract class FakeProcessManager implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true, // ignored
bool runInShell = false, // ignored
Encoding stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding,
Encoding? stdoutEncoding = io.systemEncoding,
Encoding? stderrEncoding = io.systemEncoding,
}) async {
final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding);
await process.exitCode;
......@@ -321,8 +321,8 @@ abstract class FakeProcessManager implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true, // ignored
bool runInShell = false, // ignored
Encoding stdoutEncoding = io.systemEncoding, // actual encoder is ignored
Encoding stderrEncoding = io.systemEncoding, // actual encoder is ignored
Encoding? stdoutEncoding = io.systemEncoding, // actual encoder is ignored
Encoding? stderrEncoding = io.systemEncoding, // actual encoder is ignored
}) {
final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding);
return io.ProcessResult(
......@@ -361,7 +361,7 @@ class _FakeAnyProcessManager extends FakeProcessManager {
List<String> command,
String? workingDirectory,
Map<String, String>? environment,
Encoding encoding,
Encoding? encoding,
) {
return FakeCommand(
command: command,
......@@ -391,7 +391,7 @@ class _SequenceProcessManager extends FakeProcessManager {
List<String> command,
String? workingDirectory,
Map<String, String>? environment,
Encoding encoding,
Encoding? encoding,
) {
expect(_commands, isNotEmpty,
reason: 'ProcessManager was told to execute $command (in $workingDirectory) '
......
......@@ -136,8 +136,8 @@ class FakeProcessManager extends Fake implements ProcessManager {
Map<String, String>? environment,
bool includeParentEnvironment = true,
bool runInShell = false,
Encoding stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding,
Encoding? stdoutEncoding = systemEncoding,
Encoding? stderrEncoding = systemEncoding,
}) async {
runCommands.add(command);
return fakeResult!;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment