Use dart pub instead of pub to invoke pub from tools (#88509)

Top level `pub` is being deprecated.
This commit is contained in:
Sigurd Meldgaard
2021-08-24 15:51:08 +02:00
committed by GitHub
parent 6dc18ef74e
commit 7c24ff2c5b
4 changed files with 67 additions and 50 deletions

View File

@@ -234,9 +234,7 @@ class _DefaultPub implements Pub {
final bool verbose = _logger.isVerbose;
final List<String> args = <String>[
if (verbose)
'--verbose'
else
'--verbosity=warning',
'--verbose',
...<String>[
command,
'--no-precompile',
@@ -419,7 +417,7 @@ class _DefaultPub implements Pub {
'cache',
'dart-sdk',
'bin',
'pub',
'dart',
]);
if (!_processManager.canRun(sdkPath)) {
throwToolExit(
@@ -428,7 +426,7 @@ class _DefaultPub implements Pub {
'permissions for the current user.'
);
}
return <String>[sdkPath, ...arguments];
return <String>[sdkPath, '--no-analytics', 'pub', ...arguments];
}
// Returns the environment value that should be used when running pub.