| Index: utils/pub/source.dart
|
| diff --git a/utils/pub/source.dart b/utils/pub/source.dart
|
| index 777c1a0222fc8f8ffbd1e4e9229cc5ca77009279..5f79e2986bfd8059c11b66503fe06119194daa64 100644
|
| --- a/utils/pub/source.dart
|
| +++ b/utils/pub/source.dart
|
| @@ -5,6 +5,9 @@
|
| library source;
|
|
|
| import 'dart:async';
|
| +
|
| +import '../../pkg/path/lib/path.dart' as path;
|
| +
|
| import 'io.dart';
|
| import 'package.dart';
|
| import 'pubspec.dart';
|
| @@ -105,15 +108,15 @@ abstract class Source {
|
| ///
|
| /// By default, this uses [systemCacheDirectory] and [install].
|
| Future<Package> installToSystemCache(PackageId id) {
|
| - var path;
|
| + var packageDir;
|
| return systemCacheDirectory(id).then((p) {
|
| - path = p;
|
| - if (dirExists(path)) return true;
|
| - ensureDir(dirname(path));
|
| - return install(id, path);
|
| + packageDir = p;
|
| + if (dirExists(packageDir)) return true;
|
| + ensureDir(path.dirname(packageDir));
|
| + return install(id, packageDir);
|
| }).then((found) {
|
| if (!found) throw 'Package $id not found.';
|
| - return new Package.load(id.name, path, systemCache.sources);
|
| + return new Package.load(id.name, packageDir, systemCache.sources);
|
| });
|
| }
|
|
|
|
|