| Index: lib/src/global_packages.dart
|
| diff --git a/lib/src/global_packages.dart b/lib/src/global_packages.dart
|
| index 86ed14792d81b209ea5a77845a7f51b119ca6eda..bb2b588458dee35c3459d60f783e3a4cf00da766 100644
|
| --- a/lib/src/global_packages.dart
|
| +++ b/lib/src/global_packages.dart
|
| @@ -321,12 +321,17 @@ class GlobalPackages {
|
| isGlobal: true);
|
| }
|
|
|
| - if (entrypoint.root.pubspec.environment.sdkVersion.allows(sdk.version)) {
|
| - return entrypoint;
|
| + if (entrypoint.root.pubspec.flutterSdkConstraint != null) {
|
| + dataError("${log.bold(name)} ${entrypoint.root.version} requires the "
|
| + "Flutter SDK, which is unsupported for global executables.");
|
| }
|
|
|
| - dataError("${log.bold(name)} ${entrypoint.root.version} doesn't support "
|
| - "Dart ${sdk.version}.");
|
| + if (!entrypoint.root.pubspec.dartSdkConstraint.allows(sdk.version)) {
|
| + dataError("${log.bold(name)} ${entrypoint.root.version} doesn't support "
|
| + "Dart ${sdk.version}.");
|
| + }
|
| +
|
| + return entrypoint;
|
| }
|
|
|
| /// Runs [package]'s [executable] with [args].
|
|
|