mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Clarify pub.dart messages (#6856)
This commit is contained in:
parent
6c93270d85
commit
fd5a08941e
@ -58,20 +58,22 @@ Future<Null> pubGet({
|
||||
throwToolExit('pub $command failed ($code)', exitCode: code);
|
||||
}
|
||||
|
||||
if (dotPackages.existsSync() && dotPackages.lastModifiedSync().isAfter(pubSpecYaml.lastModifiedSync()))
|
||||
return;
|
||||
if (!dotPackages.existsSync())
|
||||
throwToolExit('$directory: pub did not create .packages file');
|
||||
|
||||
throwToolExit('$directory: pubspec.yaml and .packages are in an inconsistent state');
|
||||
if (dotPackages.lastModifiedSync().isBefore(pubSpecYaml.lastModifiedSync()))
|
||||
throwToolExit('$directory: pub did not update .packages file (pubspec.yaml file has a newer timestamp)');
|
||||
}
|
||||
|
||||
String _filterOverrideWarnings(String str) {
|
||||
// Warning: You are using these overridden dependencies:
|
||||
// ! analyzer 0.29.0-alpha.0 from path ../../bin/cache/dart-sdk/lib/analyzer
|
||||
final RegExp _analyzerWarning = new RegExp(r'^! analyzer [^ ]+ from path \.\./\.\./bin/cache/dart-sdk/lib/analyzer$');
|
||||
|
||||
if (str.contains('overridden dependencies:'))
|
||||
String _filterOverrideWarnings(String message) {
|
||||
// This function filters out these two messages:
|
||||
// Warning: You are using these overridden dependencies:
|
||||
// ! analyzer 0.29.0-alpha.0 from path ../../bin/cache/dart-sdk/lib/analyzer
|
||||
if (message == 'Warning: You are using these overridden dependencies:')
|
||||
return null;
|
||||
if (str.startsWith('! analyzer '))
|
||||
if (message.contains(_analyzerWarning))
|
||||
return null;
|
||||
|
||||
return str;
|
||||
return message;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user