OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library pub.command.global_run; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 | 6 |
9 import 'package:barback/barback.dart'; | 7 import 'package:barback/barback.dart'; |
10 import 'package:path/path.dart' as p; | 8 import 'package:path/path.dart' as p; |
11 | 9 |
12 import '../command.dart'; | 10 import '../command.dart'; |
13 import '../io.dart'; | 11 import '../io.dart'; |
14 import '../utils.dart'; | 12 import '../utils.dart'; |
15 | 13 |
16 /// Handles the `global run` pub command. | 14 /// Handles the `global run` pub command. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 if (p.split(executable).length > 1) { | 50 if (p.split(executable).length > 1) { |
53 usageException('Cannot run an executable in a subdirectory of a global ' | 51 usageException('Cannot run an executable in a subdirectory of a global ' |
54 'package.'); | 52 'package.'); |
55 } | 53 } |
56 | 54 |
57 var exitCode = await globals.runExecutable(package, executable, args, | 55 var exitCode = await globals.runExecutable(package, executable, args, |
58 checked: argResults["checked"], mode: mode); | 56 checked: argResults["checked"], mode: mode); |
59 await flushThenExit(exitCode); | 57 await flushThenExit(exitCode); |
60 } | 58 } |
61 } | 59 } |
OLD | NEW |