| Index: utils/pub/sdk_source.dart
|
| diff --git a/utils/pub/sdk_source.dart b/utils/pub/sdk_source.dart
|
| index e6d46473ba703798ea83447cec7b1db52f54cf25..5b10d09e068e8f29ba60224c2de55241bda30afc 100644
|
| --- a/utils/pub/sdk_source.dart
|
| +++ b/utils/pub/sdk_source.dart
|
| @@ -48,9 +48,19 @@ class SdkSource extends Source {
|
| * involves symlinking the SDK library into the packages directory.
|
| */
|
| Future<bool> install(PackageId id, String destPath) {
|
| - var sourcePath = join(rootDir, "lib", id.description);
|
| - return exists(sourcePath).chain((exists) {
|
| - if (!exists) return new Future<bool>.immediate(false);
|
| + // Look in "pkg" first.
|
| + var sourcePath = join(rootDir, "pkg", id.description);
|
| + return exists(sourcePath).chain((found) {
|
| + if (!found) {
|
| + // TODO(rnystrom): Get rid of this when all SDK packages are moved from
|
| + // "lib" to "pkg".
|
| + // Not in "pkg", so try "lib".
|
| + sourcePath = join(rootDir, "lib", id.description);
|
| + return exists(sourcePath).chain((found) {
|
| + if (!found) return new Future<bool>.immediate(false);
|
| + return createSymlink(sourcePath, destPath).transform((_) => true);
|
| + });
|
| + }
|
| return createSymlink(sourcePath, destPath).transform((_) => true);
|
| });
|
| }
|
|
|