[flutter_tools] allow unmuting of command logging (#61198)

Running flutter doctor -v prints out extra details instead of running in verbose mode. Allow disabling this with -vv so it can be debugged.
This commit is contained in:
Jonah Williams
2020-07-09 17:55:53 -07:00
committed by GitHub
parent 01ac509620
commit ed9a705ec2
2 changed files with 15 additions and 2 deletions

View File

@@ -58,13 +58,14 @@ import 'src/web/web_runner.dart';
///
/// This function is intended to be used from the `flutter` command line tool.
Future<void> main(List<String> args) async {
final bool verbose = args.contains('-v') || args.contains('--verbose');
final bool veryVerbose = args.contains('-vv');
final bool verbose = args.contains('-v') || args.contains('--verbose') || veryVerbose;
final bool doctor = (args.isNotEmpty && args.first == 'doctor') ||
(args.length == 2 && verbose && args.last == 'doctor');
final bool help = args.contains('-h') || args.contains('--help') ||
(args.isNotEmpty && args.first == 'help') || (args.length == 1 && verbose);
final bool muteCommandLogging = help || doctor;
final bool muteCommandLogging = (help || doctor) && !veryVerbose;
final bool verboseHelp = help && verbose;
final bool daemon = args.contains('daemon');
final bool runMachine = (args.contains('--machine') && args.contains('run')) ||