Skip to content

Commit

Permalink
Don't mention subcommand in flutter suggestion (#3994)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdm authored Sep 26, 2023
1 parent 7c27a97 commit fca927a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/src/sdk/flutter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class FlutterSdk extends Sdk {

@override
String get installMessage =>
'Flutter users should run `flutter pub get` instead of `dart pub get`.';
'Flutter users should use `flutter pub` instead of `dart pub`.';

@override
Version? get version {
Expand Down
4 changes: 2 additions & 2 deletions test/hosted/fail_gracefully_with_hint_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void main() {
'name': 'foo',
'version': '1.2.3',
'environment': {
'flutter': 'any', // generates hint -> flutter pub get
'flutter': 'any', // generates hint -> flutter pub
},
}),
]),
Expand All @@ -55,7 +55,7 @@ void main() {
exitCode: exit_codes.UNAVAILABLE,
error: allOf(
contains('Try again without --offline!'),
contains('flutter pub get'), // hint that
contains('flutter pub'), // hint that
),
);

Expand Down
3 changes: 1 addition & 2 deletions test/sdk_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,7 @@ Because myapp depends on foo from sdk which doesn't exist (unknown SDK "unknown"
Because myapp depends on foo from sdk which doesn't exist (the
Flutter SDK is not available), version solving failed.
Flutter users should run `flutter pub get` instead of `dart pub
get`.
Flutter users should use `flutter pub` instead of `dart pub`.
"""),
exitCode: exit_codes.UNAVAILABLE,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Resolving dependencies...
[STDERR] Because foo <1.2.4 requires the Flutter SDK and foo >=1.2.4 depends on bar any, every version of foo requires bar any.
[STDERR] So, because bar doesn't exist (could not find package bar in cache) and myapp depends on foo any, version solving failed.
[STDERR]
[STDERR] Flutter users should run `flutter pub get` instead of `dart pub get`.
[STDERR] Flutter users should use `flutter pub` instead of `dart pub`.
[STDERR]
[STDERR] Try again without --offline!
[EXIT CODE] 69
Expand Down
6 changes: 3 additions & 3 deletions test/version_solver_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ void sdkConstraint() {
error: equalsIgnoringWhitespace('''
Because myapp requires the Flutter SDK, version solving failed.
Flutter users should run `flutter pub get` instead of `dart pub get`.
Flutter users should use `flutter pub` instead of `dart pub`.
'''),
);
});
Expand All @@ -1304,7 +1304,7 @@ void sdkConstraint() {
Because myapp depends on foo any which requires the Flutter SDK, version
solving failed.
Flutter users should run `flutter pub get` instead of `dart pub get`.
Flutter users should use `flutter pub` instead of `dart pub`.
'''),
);
});
Expand Down Expand Up @@ -1337,7 +1337,7 @@ void sdkConstraint() {
error: equalsIgnoringWhitespace('''
Because myapp requires the Flutter SDK, version solving failed.
Flutter users should run `flutter pub get` instead of `dart pub get`.
Flutter users should use `flutter pub` instead of `dart pub`.
'''),
);
});
Expand Down

0 comments on commit fca927a

Please sign in to comment.