OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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('sdk_source'); | 5 #library('sdk_source'); |
6 | 6 |
7 #import('io.dart'); | 7 #import('io.dart'); |
8 #import('package.dart'); | 8 #import('package.dart'); |
9 #import('pubspec.dart'); | 9 #import('pubspec.dart'); |
10 #import('source.dart'); | 10 #import('source.dart'); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Look in "pkg" first. | 51 // Look in "pkg" first. |
52 var sourcePath = join(rootDir, "pkg", id.description); | 52 var sourcePath = join(rootDir, "pkg", id.description); |
53 return exists(sourcePath).chain((found) { | 53 return exists(sourcePath).chain((found) { |
54 if (!found) { | 54 if (!found) { |
55 // TODO(rnystrom): Get rid of this when all SDK packages are moved from | 55 // TODO(rnystrom): Get rid of this when all SDK packages are moved from |
56 // "lib" to "pkg". | 56 // "lib" to "pkg". |
57 // Not in "pkg", so try "lib". | 57 // Not in "pkg", so try "lib". |
58 sourcePath = join(rootDir, "lib", id.description); | 58 sourcePath = join(rootDir, "lib", id.description); |
59 return exists(sourcePath).chain((found) { | 59 return exists(sourcePath).chain((found) { |
60 if (!found) return new Future<bool>.immediate(false); | 60 if (!found) return new Future<bool>.immediate(false); |
61 return createSymlink(sourcePath, destPath).transform((_) => true); | 61 return createPackageSymlink(id.name, sourcePath, destPath).transform( |
| 62 (_) => true); |
62 }); | 63 }); |
63 } | 64 } |
64 return createSymlink(sourcePath, destPath).transform((_) => true); | 65 |
| 66 return createPackageSymlink(id.name, sourcePath, destPath).transform( |
| 67 (_) => true); |
65 }); | 68 }); |
66 } | 69 } |
67 } | 70 } |
OLD | NEW |