Deprecate these old APIs (#116793)

Deprecate these old APIs
This commit is contained in:
Ian Hickson
2023-04-06 12:53:50 -07:00
committed by GitHub
parent 54e600049f
commit 806c1f8186
16 changed files with 113 additions and 81 deletions

View File

@@ -94,13 +94,18 @@ Future<void> runProcessWithValidations(
List<String> command,
String workingDirectory, {
@visibleForTesting ProcessManager processManager = const LocalProcessManager(),
bool verbose = true,
}) async {
final ProcessResult result =
processManager.runSync(command, stdoutEncoding: utf8, workingDirectory: workingDirectory);
if (result.exitCode == 0) {
print('Stdout: ${result.stdout}');
if (verbose) {
print('stdout: ${result.stdout}');
}
} else {
print('StdErr: ${result.stderr}');
if (verbose) {
print('stderr: ${result.stderr}');
}
throw CommandException();
}
}