| Index: sdk/lib/_internal/pub/lib/src/command/global_run.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/command/global_run.dart b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
|
| index ae47a052e9ecc240598266ef6f463f7ac15d96b6..06783e5103db7cb129acaa5122b734d8988fe8a7 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/command/global_run.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
|
| @@ -6,6 +6,7 @@ library pub.command.global_run;
|
|
|
| import 'dart:async';
|
|
|
| +import 'package:barback/barback.dart';
|
| import 'package:path/path.dart' as p;
|
|
|
| import '../command.dart';
|
| @@ -21,6 +22,14 @@ class GlobalRunCommand extends PubCommand {
|
| "NOTE: We are currently optimizing this command's startup time.";
|
| String get usage => "pub global run <package>:<executable> [args...]";
|
|
|
| + /// The mode for barback transformers.
|
| + BarbackMode get mode => new BarbackMode(commandOptions["mode"]);
|
| +
|
| + GlobalRunCommand() {
|
| + commandParser.addOption("mode", defaultsTo: "release",
|
| + help: 'Mode to run transformers in.');
|
| + }
|
| +
|
| Future onRun() async {
|
| if (commandOptions.rest.isEmpty) {
|
| usageError("Must specify an executable to run.");
|
| @@ -45,7 +54,8 @@ class GlobalRunCommand extends PubCommand {
|
| 'package.');
|
| }
|
|
|
| - var exitCode = await globals.runExecutable(package, executable, args);
|
| + var exitCode = await globals.runExecutable(package, executable, args,
|
| + mode: mode);
|
| await flushThenExit(exitCode);
|
| }
|
| }
|
|
|