From a86dab0c401be5650c0ac6dbdb291877a8704523 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Fri, 13 Nov 2020 11:44:10 -0800 Subject: [PATCH] [flutter_tools] remove automatic doctor from flutter create (#70475) --- .../lib/src/commands/create.dart | 27 +++++-------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/packages/flutter_tools/lib/src/commands/create.dart b/packages/flutter_tools/lib/src/commands/create.dart index be0d6855ed..96dcf72acc 100644 --- a/packages/flutter_tools/lib/src/commands/create.dart +++ b/packages/flutter_tools/lib/src/commands/create.dart @@ -474,19 +474,18 @@ class CreateCommand extends FlutterCommand { )); globals.printStatus('Your module code is in $relativeMainPath.'); } else { - // Run doctor; tell the user the next steps. + // Tell the user the next steps. final FlutterProject project = FlutterProject.fromPath(projectDirPath); final FlutterProject app = project.hasExampleApp ? project.example : project; final String relativeAppPath = globals.fs.path.normalize(globals.fs.path.relative(app.directory.path)); final String relativeAppMain = globals.fs.path.join(relativeAppPath, 'lib', 'main.dart'); final String relativePluginPath = globals.fs.path.normalize(globals.fs.path.relative(projectDirPath)); final String relativePluginMain = globals.fs.path.join(relativePluginPath, 'lib', '$projectName.dart'); - if (globals.doctor.canLaunchAnything) { - // Let them know a summary of the state of their tooling. - await globals.doctor.summary(); - final List platforms = _getSupportedPlatformsFromTemplateContext(templateContext); - final String platformsString = platforms.join(', '); - globals.printStatus(''' + + // Let them know a summary of the state of their tooling. + final List platforms = _getSupportedPlatformsFromTemplateContext(templateContext); + final String platformsString = platforms.join(', '); + globals.printStatus(''' In order to run your $application, type: \$ cd $relativeAppPath @@ -501,20 +500,6 @@ Your plugin code is in $relativePluginMain. Host platform code is in the $platformsString directories under $relativePluginPath. To edit platform code in an IDE see https://flutter.dev/developing-packages/#edit-plugin-package. '''); - } - } else { - globals.printStatus("You'll need to install additional components before you can run " - 'your Flutter app:'); - globals.printStatus(''); - - // Give the user more detailed analysis. - await globals.doctor.diagnose(); - globals.printStatus(''); - globals.printStatus("After installing components, run 'flutter doctor' in order to " - 're-validate your setup.'); - globals.printStatus("When complete, type 'flutter run' from the '$relativeAppPath' " - 'directory in order to launch your app.'); - globals.printStatus('Your $application code is in $relativeAppMain'); } } return FlutterCommandResult.success();