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 { ...@@ -682,8 +682,8 @@ class FakeProcessManager extends Fake implements ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, bool includeParentEnvironment = true,
bool runInShell = false, bool runInShell = false,
Encoding stdoutEncoding = systemEncoding, Encoding? stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding,
}) async { }) async {
workingDirectories.add(workingDirectory); workingDirectories.add(workingDirectory);
final ProcessResult? result = processResults[RunInvocation(command.cast<String>(), workingDirectory)]; final ProcessResult? result = processResults[RunInvocation(command.cast<String>(), workingDirectory)];
......
...@@ -662,8 +662,8 @@ class ErrorHandlingProcessManager extends ProcessManager { ...@@ -662,8 +662,8 @@ class ErrorHandlingProcessManager extends ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, bool includeParentEnvironment = true,
bool runInShell = false, bool runInShell = false,
Encoding stdoutEncoding = io.systemEncoding, Encoding? stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding, Encoding? stderrEncoding = io.systemEncoding,
}) { }) {
return _run(() { return _run(() {
return _delegate.run( return _delegate.run(
...@@ -705,8 +705,8 @@ class ErrorHandlingProcessManager extends ProcessManager { ...@@ -705,8 +705,8 @@ class ErrorHandlingProcessManager extends ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, bool includeParentEnvironment = true,
bool runInShell = false, bool runInShell = false,
Encoding stdoutEncoding = io.systemEncoding, Encoding? stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding, Encoding? stderrEncoding = io.systemEncoding,
}) { }) {
return _runSync(() { return _runSync(() {
return _delegate.runSync( return _delegate.runSync(
......
...@@ -108,7 +108,7 @@ class FakeCommand { ...@@ -108,7 +108,7 @@ class FakeCommand {
List<String> command, List<String> command,
String? workingDirectory, String? workingDirectory,
Map<String, String>? environment, Map<String, String>? environment,
Encoding encoding, Encoding? encoding,
) { ) {
expect(command, equals(this.command)); expect(command, equals(this.command));
if (this.workingDirectory != null) { if (this.workingDirectory != null) {
...@@ -244,7 +244,7 @@ abstract class FakeProcessManager implements ProcessManager { ...@@ -244,7 +244,7 @@ abstract class FakeProcessManager implements ProcessManager {
List<String> command, List<String> command,
String? workingDirectory, String? workingDirectory,
Map<String, String>? environment, Map<String, String>? environment,
Encoding encoding, Encoding? encoding,
); );
int _pid = 9999; int _pid = 9999;
...@@ -253,7 +253,7 @@ abstract class FakeProcessManager implements ProcessManager { ...@@ -253,7 +253,7 @@ abstract class FakeProcessManager implements ProcessManager {
List<String> command, List<String> command,
String? workingDirectory, String? workingDirectory,
Map<String, String>? environment, Map<String, String>? environment,
Encoding encoding, Encoding? encoding,
) { ) {
_pid += 1; _pid += 1;
final FakeCommand fakeCommand = findCommand(command, workingDirectory, environment, encoding); final FakeCommand fakeCommand = findCommand(command, workingDirectory, environment, encoding);
...@@ -301,8 +301,8 @@ abstract class FakeProcessManager implements ProcessManager { ...@@ -301,8 +301,8 @@ abstract class FakeProcessManager implements ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, // ignored bool includeParentEnvironment = true, // ignored
bool runInShell = false, // ignored bool runInShell = false, // ignored
Encoding stdoutEncoding = io.systemEncoding, Encoding? stdoutEncoding = io.systemEncoding,
Encoding stderrEncoding = io.systemEncoding, Encoding? stderrEncoding = io.systemEncoding,
}) async { }) async {
final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding); final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding);
await process.exitCode; await process.exitCode;
...@@ -321,8 +321,8 @@ abstract class FakeProcessManager implements ProcessManager { ...@@ -321,8 +321,8 @@ abstract class FakeProcessManager implements ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, // ignored bool includeParentEnvironment = true, // ignored
bool runInShell = false, // ignored bool runInShell = false, // ignored
Encoding stdoutEncoding = io.systemEncoding, // actual encoder is ignored Encoding? stdoutEncoding = io.systemEncoding, // actual encoder is ignored
Encoding stderrEncoding = io.systemEncoding, // actual encoder is ignored Encoding? stderrEncoding = io.systemEncoding, // actual encoder is ignored
}) { }) {
final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding); final _FakeProcess process = _runCommand(command.cast<String>(), workingDirectory, environment, stdoutEncoding);
return io.ProcessResult( return io.ProcessResult(
...@@ -361,7 +361,7 @@ class _FakeAnyProcessManager extends FakeProcessManager { ...@@ -361,7 +361,7 @@ class _FakeAnyProcessManager extends FakeProcessManager {
List<String> command, List<String> command,
String? workingDirectory, String? workingDirectory,
Map<String, String>? environment, Map<String, String>? environment,
Encoding encoding, Encoding? encoding,
) { ) {
return FakeCommand( return FakeCommand(
command: command, command: command,
...@@ -391,7 +391,7 @@ class _SequenceProcessManager extends FakeProcessManager { ...@@ -391,7 +391,7 @@ class _SequenceProcessManager extends FakeProcessManager {
List<String> command, List<String> command,
String? workingDirectory, String? workingDirectory,
Map<String, String>? environment, Map<String, String>? environment,
Encoding encoding, Encoding? encoding,
) { ) {
expect(_commands, isNotEmpty, expect(_commands, isNotEmpty,
reason: 'ProcessManager was told to execute $command (in $workingDirectory) ' reason: 'ProcessManager was told to execute $command (in $workingDirectory) '
......
...@@ -136,8 +136,8 @@ class FakeProcessManager extends Fake implements ProcessManager { ...@@ -136,8 +136,8 @@ class FakeProcessManager extends Fake implements ProcessManager {
Map<String, String>? environment, Map<String, String>? environment,
bool includeParentEnvironment = true, bool includeParentEnvironment = true,
bool runInShell = false, bool runInShell = false,
Encoding stdoutEncoding = systemEncoding, Encoding? stdoutEncoding = systemEncoding,
Encoding stderrEncoding = systemEncoding, Encoding? stderrEncoding = systemEncoding,
}) async { }) async {
runCommands.add(command); runCommands.add(command);
return fakeResult!; 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