| Index: utils/pub/pub.dart
|
| diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
|
| index d066a6c12d628613186c80029d1ef4310350d254..be7e40bc1902053ee08ea28122d16e5abfdcf61a 100644
|
| --- a/utils/pub/pub.dart
|
| +++ b/utils/pub/pub.dart
|
| @@ -20,7 +20,9 @@
|
| #source('command_version.dart');
|
| #source('package.dart');
|
| #source('source.dart');
|
| +#source('source_registry.dart');
|
| #source('sdk_source.dart');
|
| +#source('git_source.dart');
|
|
|
| main() {
|
| final args = new Options().arguments;
|
| @@ -70,10 +72,10 @@ main() {
|
| }
|
| }
|
|
|
| - // TODO(rnystrom): Do we want this to be global?
|
| final cache = new SystemCache(cacheDir);
|
| -
|
| - Source.defaultSource = new SdkSource(sdkDir);
|
| + cache.sources.register(new SdkSource(sdkDir));
|
| + cache.sources.register(new GitSource());
|
| + cache.sources.setDefault('sdk');
|
|
|
| // Select the command.
|
| final command = commands[args[0]];
|
| @@ -137,7 +139,7 @@ class PubCommand {
|
| // TODO(rnystrom): Will eventually need better logic to walk up
|
| // subdirectories until we hit one that looks package-like. For now, just
|
| // assume the cwd is it.
|
| - Package.load(workingDir).then((pkg) {
|
| + Package.load(workingDir, cache.sources).then((pkg) {
|
| packagesDir = new PackagesDir(pkg, cache);
|
| onRun();
|
| });
|
|
|