Do not print the output of the package dependency tool during hot reload (#6494)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -57,7 +57,7 @@ class StartupDependencySetBuilder {
|
||||
|
||||
String output;
|
||||
try {
|
||||
output = runCheckedSync(args);
|
||||
output = runCheckedSync(args, hideStdout: true);
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user