suppress pub override warning; decouple the analyzer versions (#5991)
* suppress warning; decouple the analyzer versions * also pass in --no-packages-dir
This commit is contained in:
@@ -49,7 +49,8 @@ Future<int> pubGet({
|
||||
Status status = logger.startProgress("Running 'pub $command' in ${path.basename(directory)}...");
|
||||
int code = await runCommandAndStreamOutput(
|
||||
<String>[sdkBinaryName('pub'), '--verbosity=warning', command, '--no-packages-dir', '--no-precompile'],
|
||||
workingDirectory: directory
|
||||
workingDirectory: directory,
|
||||
mapFunction: _filterOverrideWarnings
|
||||
);
|
||||
status.stop(showElapsedTime: true);
|
||||
if (code != 0)
|
||||
@@ -62,3 +63,15 @@ Future<int> pubGet({
|
||||
printError('$directory: pubspec.yaml and .packages are in an inconsistent state');
|
||||
return 1;
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
if (str.contains('overridden dependencies:'))
|
||||
return null;
|
||||
if (str.startsWith('! analyzer '))
|
||||
return null;
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user