diff --git a/lib/src/util.dart b/lib/src/util.dart index 368f84c..be4a017 100644 --- a/lib/src/util.dart +++ b/lib/src/util.dart @@ -74,9 +74,7 @@ String? _resolveLibPath(String name) { // If lib is in Flutter's '.pub_cache' folder. final env = Platform.environment; if (env.containsKey('FLUTTER_ROOT')) { - final flutterPubCache = - PubCache(Directory(path.join(env['FLUTTER_ROOT']!, '.pub-cache'))); - libPath = checkCache(flutterPubCache); + libPath = checkCache(PubCache()); if (_doesFileExist(libPath)) return libPath; } diff --git a/test/remote_test.dart b/test/remote_test.dart index 126f317..caa3a63 100644 --- a/test/remote_test.dart +++ b/test/remote_test.dart @@ -278,7 +278,7 @@ void main() { expect(refs.first.localId, null); expect(refs.first.name, 'HEAD'); expect(refs.first.symRef, 'refs/heads/master'); - expect((refs.first.oid).sha, '49322bb17d3acc9146f98c97d078513228bbf3c0'); + expect(refs.first.oid.sha, '49322bb17d3acc9146f98c97d078513228bbf3c0'); expect(refs.first.toString(), contains('RemoteReference{')); expect(refs.first, remote.ls().first); });