Skip to content

Commit

Permalink
Fix dart pub cache clean command on pub.dart (#128171)
Browse files Browse the repository at this point in the history
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 #128663

(Edited by @andrewkolos. Changed "related to" issue to "fixes" to link this PR to the issue).
  • Loading branch information
deryrahman committed Jun 15, 2023
1 parent cc83f03 commit 6b5766d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/dart/pub.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 6b5766d

Please sign in to comment.