| Index: lib/src/command/cache_add.dart
|
| diff --git a/lib/src/command/cache_add.dart b/lib/src/command/cache_add.dart
|
| index 77cfd81d106592e6fa2219a870e4bf6d74258d0b..b332860b19dee2c65d18ac4a9d1d3c138d7b2c77 100644
|
| --- a/lib/src/command/cache_add.dart
|
| +++ b/lib/src/command/cache_add.dart
|
| @@ -8,7 +8,6 @@ import 'package:pub_semver/pub_semver.dart';
|
|
|
| import '../command.dart';
|
| import '../log.dart' as log;
|
| -import '../source/hosted.dart';
|
| import '../utils.dart';
|
|
|
| /// Handles the `cache add` pub command.
|
| @@ -54,10 +53,10 @@ class CacheAddCommand extends PubCommand {
|
| }
|
|
|
| // TODO(rnystrom): Support installing from git too.
|
| - var source = cache.sources["hosted"];
|
| + var source = cache.liveSource("hosted");
|
|
|
| // TODO(rnystrom): Allow specifying the server.
|
| - var ids = (await source.getVersions(HostedSource.refFor(package)))
|
| + var ids = (await source.getVersions(cache.sources.hosted.refFor(package)))
|
| .where((id) => constraint.allows(id.version))
|
| .toList();
|
|
|
|
|