Help verbose show hidden options (#5979)
* show hidden flags when showing verbose help * flutter -v show verbose help
This commit is contained in:
@@ -47,8 +47,9 @@ import 'src/runner/flutter_command_runner.dart';
|
||||
///
|
||||
/// This function is intended to be used from the `flutter` command line tool.
|
||||
Future<Null> main(List<String> args) async {
|
||||
bool help = args.contains('-h') || args.contains('--help');
|
||||
bool verbose = args.contains('-v') || args.contains('--verbose');
|
||||
bool help = args.contains('-h') || args.contains('--help') ||
|
||||
(args.isNotEmpty && args.first == 'help') || (args.length == 1 && verbose);
|
||||
bool verboseHelp = help && verbose;
|
||||
|
||||
if (verboseHelp) {
|
||||
@@ -58,8 +59,8 @@ Future<Null> main(List<String> args) async {
|
||||
}
|
||||
|
||||
FlutterCommandRunner runner = new FlutterCommandRunner(verboseHelp: verboseHelp)
|
||||
..addCommand(new AnalyzeCommand())
|
||||
..addCommand(new BuildCommand())
|
||||
..addCommand(new AnalyzeCommand(verboseHelp: verboseHelp))
|
||||
..addCommand(new BuildCommand(verboseHelp: verboseHelp))
|
||||
..addCommand(new ChannelCommand())
|
||||
..addCommand(new ConfigCommand())
|
||||
..addCommand(new CreateCommand())
|
||||
@@ -74,7 +75,7 @@ Future<Null> main(List<String> args) async {
|
||||
..addCommand(new PackagesCommand())
|
||||
..addCommand(new PrecacheCommand())
|
||||
..addCommand(new RefreshCommand())
|
||||
..addCommand(new RunCommand())
|
||||
..addCommand(new RunCommand(verboseHelp: verboseHelp))
|
||||
..addCommand(new RunMojoCommand(hidden: !verboseHelp))
|
||||
..addCommand(new ScreenshotCommand())
|
||||
..addCommand(new SetupCommand(hidden: !verboseHelp))
|
||||
|
||||
Reference in New Issue
Block a user