Suppress verbose output from ios-deploy when not in verbose mode. (#4423)

This commit is contained in:
Chinmay Garde
2016-06-07 12:02:08 -07:00
parent 0783f9d633
commit 68ba5bfd7c
2 changed files with 9 additions and 3 deletions

View File

@@ -29,6 +29,7 @@ Future<Process> runCommand(List<String> cmd, { String workingDirectory }) async
Future<int> runCommandAndStreamOutput(List<String> cmd, {
String workingDirectory,
String prefix: '',
bool trace: false,
RegExp filter,
StringConverter mapFunction
}) async {
@@ -40,8 +41,13 @@ Future<int> runCommandAndStreamOutput(List<String> cmd, {
.listen((String line) {
if (mapFunction != null)
line = mapFunction(line);
if (line != null)
printStatus('$prefix$line');
if (line != null) {
String message = '$prefix$line';
if (trace)
printTrace(message);
else
printStatus(message);
}
});
process.stderr
.transform(UTF8.decoder)

View File

@@ -203,7 +203,7 @@ class IOSDevice extends Device {
'--bundle',
bundle.path,
'--justlaunch',
]);
], trace: true);
if (installationResult != 0) {
printError('Could not install ${bundle.path} on $id.');