Fix dart pub cache clean command on pub.dart (#128171)

Command instruction for clearing dart pub cache is somewhat wrong. Instead of `clear`, `clean` is the correct one. Ref: https://dart.dev/tools/pub/cmd/pub-cache

Fixes https://github.com/flutter/flutter/issues/128663

(Edited by @andrewkolos. Changed "related to" issue to "fixes" to link this PR to the issue).
This commit is contained in:
Dery Rahman Ahaddienata 2023-06-16 03:38:04 +07:00 committed by GitHub
parent cc83f03822
commit 6b5766d41e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -630,7 +630,7 @@ class _DefaultPub implements Pub {
_logger.printStatus('''
Found an existing Pub cache at $pubCachePath.
It can be repaired by running `dart pub cache repair`.
It can be reset by running `dart pub cache clear`.''');
It can be reset by running `dart pub cache clean`.''');
}
}
final String? home = _platform.environment['HOME'];

View File

@ -940,6 +940,8 @@ exit code: 66
context: PubContext.flutterTests);
expect(logger.statusText,
contains('Found an existing Pub cache at /global/.pub-cache'));
expect(logger.statusText,
contains('It can be reset by running `dart pub cache clean`'));
expect(
logger.statusText,
contains(