Chromium Code Reviews| Index: utils/pub/pub.dart |
| diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart |
| index 45c6c9815aad625a4abd0c22919f842aea331d9e..23037fef81e2a7202ab0d732328cd3ab222bd37d 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; |
| @@ -72,8 +74,9 @@ main() { |
| // TODO(rnystrom): Do we want this to be global? |
|
Bob Nystrom
2012/05/08 17:01:49
If you don't mind, remove this TODO. I think we've
nweiz
2012/05/09 00:21:04
Done.
|
| 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 +140,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(); |
| }); |