| OLD | NEW |
| 1 library pub.global_packages; | 1 library pub.global_packages; |
| 2 import 'dart:async'; | 2 import 'dart:async'; |
| 3 import 'dart:io'; | 3 import 'dart:io'; |
| 4 import 'package:path/path.dart' as p; | 4 import 'package:path/path.dart' as p; |
| 5 import 'package:barback/barback.dart'; | 5 import 'package:barback/barback.dart'; |
| 6 import 'package:pub_semver/pub_semver.dart'; |
| 6 import 'barback/asset_environment.dart'; | 7 import 'barback/asset_environment.dart'; |
| 7 import 'entrypoint.dart'; | 8 import 'entrypoint.dart'; |
| 8 import 'executable.dart' as exe; | 9 import 'executable.dart' as exe; |
| 9 import 'io.dart'; | 10 import 'io.dart'; |
| 10 import 'lock_file.dart'; | 11 import 'lock_file.dart'; |
| 11 import 'log.dart' as log; | 12 import 'log.dart' as log; |
| 12 import 'package.dart'; | 13 import 'package.dart'; |
| 13 import 'pubspec.dart'; | 14 import 'pubspec.dart'; |
| 14 import 'sdk.dart' as sdk; | 15 import 'sdk.dart' as sdk; |
| 15 import 'solver/version_solver.dart'; | 16 import 'solver/version_solver.dart'; |
| 16 import 'source/cached.dart'; | 17 import 'source/cached.dart'; |
| 17 import 'source/git.dart'; | 18 import 'source/git.dart'; |
| 18 import 'source/path.dart'; | 19 import 'source/path.dart'; |
| 19 import 'system_cache.dart'; | 20 import 'system_cache.dart'; |
| 20 import 'utils.dart'; | 21 import 'utils.dart'; |
| 21 import 'version.dart'; | |
| 22 final _binStubPackagePattern = new RegExp(r"Package: ([a-zA-Z0-9_-]+)"); | 22 final _binStubPackagePattern = new RegExp(r"Package: ([a-zA-Z0-9_-]+)"); |
| 23 class GlobalPackages { | 23 class GlobalPackages { |
| 24 final SystemCache cache; | 24 final SystemCache cache; |
| 25 String get _directory => p.join(cache.rootDir, "global_packages"); | 25 String get _directory => p.join(cache.rootDir, "global_packages"); |
| 26 String get _binStubDir => p.join(cache.rootDir, "bin"); | 26 String get _binStubDir => p.join(cache.rootDir, "bin"); |
| 27 GlobalPackages(this.cache); | 27 GlobalPackages(this.cache); |
| 28 Future activateGit(String repo, List<String> executables, | 28 Future activateGit(String repo, List<String> executables, |
| 29 {bool overwriteBinStubs}) { | 29 {bool overwriteBinStubs}) { |
| 30 final completer0 = new Completer(); | 30 final completer0 = new Completer(); |
| 31 scheduleMicrotask(() { | 31 scheduleMicrotask(() { |
| (...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 } | 584 } |
| 585 log.warning( | 585 log.warning( |
| 586 "${log.yellow('Warning:')} Pub installs executables into " | 586 "${log.yellow('Warning:')} Pub installs executables into " |
| 587 "${log.bold(binDir)}, which is not on your path.\n" | 587 "${log.bold(binDir)}, which is not on your path.\n" |
| 588 "You can fix that by adding this to your shell's config file " | 588 "You can fix that by adding this to your shell's config file " |
| 589 "(.bashrc, .bash_profile, etc.):\n" "\n" | 589 "(.bashrc, .bash_profile, etc.):\n" "\n" |
| 590 " ${log.bold('export PATH="\$PATH":"$binDir"')}\n" "\n"); | 590 " ${log.bold('export PATH="\$PATH":"$binDir"')}\n" "\n"); |
| 591 } | 591 } |
| 592 } | 592 } |
| 593 } | 593 } |
| OLD | NEW |