| Index: sdk/lib/_internal/pub/lib/src/command/lish.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/command/lish.dart b/sdk/lib/_internal/pub/lib/src/command/lish.dart
|
| index d5b6b50f51009ff2ff4f733175a4962d3f74c4ca..1cc95ace29773c7b68628666a7b7a8dddbbf7371 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/command/lish.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/command/lish.dart
|
| @@ -15,6 +15,7 @@ import '../http.dart';
|
| import '../io.dart';
|
| import '../log.dart' as log;
|
| import '../oauth2.dart' as oauth2;
|
| +import '../sdk.dart' as sdk;
|
| import '../source/hosted.dart';
|
| import '../utils.dart';
|
| import '../validator.dart';
|
| @@ -93,6 +94,15 @@ class LishCommand extends PubCommand {
|
| }
|
|
|
| Future onRun() {
|
| + // Sanity check. Don't push to the production server when running tests or
|
| + // developing on pub.
|
| + if (sdk.isBleedingEdge &&
|
| + server.toString() == HostedSource.defaultUrl &&
|
| + !dryRun) {
|
| + log.error('Cannot publish to $server from bleeding edge pub!');
|
| + return null;
|
| + }
|
| +
|
| if (force && dryRun) {
|
| log.error('Cannot use both --force and --dry-run.');
|
| this.printUsage();
|
|
|