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.global_packages; | 5 library pub.global_packages; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:path/path.dart' as p; | 10 import 'package:path/path.dart' as p; |
11 import 'package:barback/barback.dart'; | 11 import 'package:barback/barback.dart'; |
| 12 import 'package:pub_semver/pub_semver.dart'; |
12 | 13 |
13 import 'barback/asset_environment.dart'; | 14 import 'barback/asset_environment.dart'; |
14 import 'entrypoint.dart'; | 15 import 'entrypoint.dart'; |
15 import 'executable.dart' as exe; | 16 import 'executable.dart' as exe; |
16 import 'io.dart'; | 17 import 'io.dart'; |
17 import 'lock_file.dart'; | 18 import 'lock_file.dart'; |
18 import 'log.dart' as log; | 19 import 'log.dart' as log; |
19 import 'package.dart'; | 20 import 'package.dart'; |
20 import 'pubspec.dart'; | 21 import 'pubspec.dart'; |
21 import 'sdk.dart' as sdk; | 22 import 'sdk.dart' as sdk; |
22 import 'solver/version_solver.dart'; | 23 import 'solver/version_solver.dart'; |
23 import 'source/cached.dart'; | 24 import 'source/cached.dart'; |
24 import 'source/git.dart'; | 25 import 'source/git.dart'; |
25 import 'source/path.dart'; | 26 import 'source/path.dart'; |
26 import 'system_cache.dart'; | 27 import 'system_cache.dart'; |
27 import 'utils.dart'; | 28 import 'utils.dart'; |
28 import 'version.dart'; | |
29 | 29 |
30 /// Matches the package name that a binstub was created for inside the contents | 30 /// Matches the package name that a binstub was created for inside the contents |
31 /// of the shell script. | 31 /// of the shell script. |
32 final _binStubPackagePattern = new RegExp(r"Package: ([a-zA-Z0-9_-]+)"); | 32 final _binStubPackagePattern = new RegExp(r"Package: ([a-zA-Z0-9_-]+)"); |
33 | 33 |
34 /// Maintains the set of packages that have been globally activated. | 34 /// Maintains the set of packages that have been globally activated. |
35 /// | 35 /// |
36 /// These have been hand-chosen by the user to make their executables in bin/ | 36 /// These have been hand-chosen by the user to make their executables in bin/ |
37 /// available to the entire system. This lets them access them even when the | 37 /// available to the entire system. This lets them access them even when the |
38 /// current working directory is not inside another entrypoint package. | 38 /// current working directory is not inside another entrypoint package. |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 "${log.yellow('Warning:')} Pub installs executables into " | 649 "${log.yellow('Warning:')} Pub installs executables into " |
650 "${log.bold(binDir)}, which is not on your path.\n" | 650 "${log.bold(binDir)}, which is not on your path.\n" |
651 "You can fix that by adding this to your shell's config file " | 651 "You can fix that by adding this to your shell's config file " |
652 "(.bashrc, .bash_profile, etc.):\n" | 652 "(.bashrc, .bash_profile, etc.):\n" |
653 "\n" | 653 "\n" |
654 " ${log.bold('export PATH="\$PATH":"$binDir"')}\n" | 654 " ${log.bold('export PATH="\$PATH":"$binDir"')}\n" |
655 "\n"); | 655 "\n"); |
656 } | 656 } |
657 } | 657 } |
658 } | 658 } |
OLD | NEW |