Commit d6aed1e7 authored by Devon Carew's avatar Devon Carew

add a --quiet option to flutter_tools (#4213)

parent 502f734d
......@@ -11,6 +11,8 @@ final AnsiTerminal terminal = new AnsiTerminal();
abstract class Logger {
bool get isVerbose => false;
bool quiet = false;
set supportsColor(bool value) {
terminal.supportsColor = value;
}
......
......@@ -412,7 +412,8 @@ class _RunAndStayResident {
_handleExit();
} else {
_printHelp();
if (!logger.quiet)
_printHelp();
terminal.singleCharMode = true;
......
......@@ -34,6 +34,10 @@ class FlutterCommandRunner extends CommandRunner {
abbr: 'v',
negatable: false,
help: 'Noisy logging, including all shell commands executed.');
argParser.addFlag('quiet',
negatable: false,
hide: !verboseHelp,
help: 'Reduce the amount of output from some commands.');
argParser.addOption('device-id',
abbr: 'd',
help: 'Target device id.');
......@@ -129,6 +133,8 @@ class FlutterCommandRunner extends CommandRunner {
if (globalResults['verbose'])
context[Logger] = new VerboseLogger();
logger.quiet = globalResults['quiet'];
if (globalResults.wasParsed('color'))
logger.supportsColor = globalResults['color'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment