Do not print the output of the package dependency tool during hot reload (#6494)

This commit is contained in:
Jason Simmons
2016-10-24 16:07:29 -07:00
committed by GitHub
parent d17e80cebf
commit 5a9b8b77e5
2 changed files with 8 additions and 5 deletions

View File

@@ -151,14 +151,16 @@ bool exitsHappy(List<String> cli) {
/// Throws an error if cmd exits with a non-zero value.
String runCheckedSync(List<String> cmd, {
String workingDirectory,
bool allowReentrantFlutter: false
bool allowReentrantFlutter: false,
bool hideStdout: false,
}) {
return _runWithLoggingSync(
cmd,
workingDirectory: workingDirectory,
allowReentrantFlutter: allowReentrantFlutter,
hideStdout: hideStdout,
checked: true,
noisyErrors: true
noisyErrors: true,
);
}
@@ -186,7 +188,8 @@ String _runWithLoggingSync(List<String> cmd, {
bool checked: false,
bool noisyErrors: false,
String workingDirectory,
bool allowReentrantFlutter: false
bool allowReentrantFlutter: false,
bool hideStdout: false,
}) {
_traceCommand(cmd, workingDirectory: workingDirectory);
ProcessResult results = Process.runSync(
@@ -198,7 +201,7 @@ String _runWithLoggingSync(List<String> cmd, {
printTrace('Exit code ${results.exitCode} from: ${cmd.join(' ')}');
if (results.stdout.isNotEmpty) {
if (results.stdout.isNotEmpty && !hideStdout) {
if (results.exitCode != 0 && noisyErrors)
printStatus(results.stdout.trim());
else

View File

@@ -57,7 +57,7 @@ class StartupDependencySetBuilder {
String output;
try {
output = runCheckedSync(args);
output = runCheckedSync(args, hideStdout: true);
} catch (e) {
return null;
}