Return void from project migrate() (#112897)
This commit is contained in:
@@ -40,9 +40,7 @@ Future<void> buildWeb(
|
||||
];
|
||||
|
||||
final ProjectMigration migration = ProjectMigration(migrators);
|
||||
if (!migration.run()) {
|
||||
throwToolExit('Failed to run all web migrations.');
|
||||
}
|
||||
migration.run();
|
||||
|
||||
final Status status = globals.logger.startProgress('Compiling $target for the Web...');
|
||||
final Stopwatch sw = Stopwatch()..start();
|
||||
|
||||
@@ -18,17 +18,16 @@ class ScrubGeneratedPluginRegistrant extends ProjectMigrator {
|
||||
final Logger _logger;
|
||||
|
||||
@override
|
||||
bool migrate() {
|
||||
void migrate() {
|
||||
final File registrant = _project.libDirectory.childFile('generated_plugin_registrant.dart');
|
||||
final File gitignore = _project.parent.directory.childFile('.gitignore');
|
||||
|
||||
if (!removeFile(registrant)) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
if (gitignore.existsSync()) {
|
||||
processFileLines(gitignore);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Cleans up the .gitignore by removing the line that mentions generated_plugin_registrant.
|
||||
|
||||
Reference in New Issue
Block a user