Unverified Commit d0abf7f9 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] don't use verbose when in doctor or help command (#58798)

parent 2adf0183
......@@ -126,7 +126,7 @@ Future<void> main(List<String> args) async {
TemplateRenderer: () => const MustacheTemplateRenderer(),
if (daemon)
Logger: () => NotifyingLogger(verbose: verbose)
else if (verbose)
else if (verbose && !muteCommandLogging)
Logger: () => VerboseLogger(StdoutLogger(
timeoutConfiguration: timeoutConfiguration,
stdio: globals.stdio,
......
......@@ -9,16 +9,30 @@ import 'package:process/process.dart';
import '../src/common.dart';
void main() {
test('All development tools are hidden', () async {
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await const LocalProcessManager().run(<String>[
flutterBin,
'-h',
'-v',
]);
test('All development tools are hidden and help text is not verbose', () async {
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await const LocalProcessManager().run(<String>[
flutterBin,
'-h',
'-v',
]);
expect(result.stdout, isNot(contains('ide-config')));
expect(result.stdout, isNot(contains('update-packages')));
expect(result.stdout, isNot(contains('inject-plugins')));
expect(result.stdout, isNot(contains('ide-config')));
expect(result.stdout, isNot(contains('update-packages')));
expect(result.stdout, isNot(contains('inject-plugins')));
// Only printed by verbose tool.
expect(result.stdout, isNot(contains('exiting with code 0')));
});
test('flutter doctor is not verbose', () async {
final String flutterBin = globals.fs.path.join(getFlutterRoot(), 'bin', 'flutter');
final ProcessResult result = await const LocalProcessManager().run(<String>[
flutterBin,
'doctor',
'-v',
]);
// Only printed by verbose tool.
expect(result.stdout, isNot(contains('exiting with code 0')));
});
}
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