From fca927ae2662204805e1646c0c0687369001a41a Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Tue, 26 Sep 2023 14:48:17 +0200 Subject: [PATCH] Don't mention subcommand in flutter suggestion (#3994) --- lib/src/sdk/flutter.dart | 2 +- test/hosted/fail_gracefully_with_hint_test.dart | 4 ++-- test/sdk_test.dart | 3 +-- .../fail_gracefully_with_hint_test/supports two hints.txt | 2 +- test/version_solver_test.dart | 6 +++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/src/sdk/flutter.dart b/lib/src/sdk/flutter.dart index 2151e874c..0421b7565 100644 --- a/lib/src/sdk/flutter.dart +++ b/lib/src/sdk/flutter.dart @@ -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 { diff --git a/test/hosted/fail_gracefully_with_hint_test.dart b/test/hosted/fail_gracefully_with_hint_test.dart index 7d9569534..78406fd32 100644 --- a/test/hosted/fail_gracefully_with_hint_test.dart +++ b/test/hosted/fail_gracefully_with_hint_test.dart @@ -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 }, }), ]), @@ -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 ), ); diff --git a/test/sdk_test.dart b/test/sdk_test.dart index adcbf9c37..cac874c89 100644 --- a/test/sdk_test.dart +++ b/test/sdk_test.dart @@ -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, ); diff --git a/test/testdata/goldens/hosted/fail_gracefully_with_hint_test/supports two hints.txt b/test/testdata/goldens/hosted/fail_gracefully_with_hint_test/supports two hints.txt index a45b0f083..ae7d2e540 100644 --- a/test/testdata/goldens/hosted/fail_gracefully_with_hint_test/supports two hints.txt +++ b/test/testdata/goldens/hosted/fail_gracefully_with_hint_test/supports two hints.txt @@ -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 diff --git a/test/version_solver_test.dart b/test/version_solver_test.dart index feb3977d4..2a414345b 100644 --- a/test/version_solver_test.dart +++ b/test/version_solver_test.dart @@ -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`. '''), ); }); @@ -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`. '''), ); }); @@ -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`. '''), ); });