replaced unawaited with synchronous / await calls where needed (#82839)
This commit is contained in:
@@ -299,14 +299,14 @@ subprojects {
|
||||
/// Adds a plugin to the pubspec.
|
||||
/// In pubspec, each dependency is expressed as key, value pair joined by a colon `:`.
|
||||
/// such as `plugin_a`:`^0.0.1` or `plugin_a`:`\npath: /some/path`.
|
||||
Future<void> addPlugin(String plugin, { String value = '' }) async {
|
||||
void addPlugin(String plugin, { String value = '' }) {
|
||||
final File pubspec = File(path.join(rootPath, 'pubspec.yaml'));
|
||||
String content = await pubspec.readAsString();
|
||||
String content = pubspec.readAsStringSync();
|
||||
content = content.replaceFirst(
|
||||
'${platformLineSep}dependencies:$platformLineSep',
|
||||
'${platformLineSep}dependencies:$platformLineSep $plugin: $value$platformLineSep',
|
||||
);
|
||||
await pubspec.writeAsString(content, flush: true);
|
||||
pubspec.writeAsStringSync(content, flush: true);
|
||||
}
|
||||
|
||||
Future<void> getPackages() async {
|
||||
|
||||
Reference in New Issue
Block a user