mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
fix: use default location of Flutter's '.pub_cache' folder
This commit is contained in:
parent
34d492a9b6
commit
057fb13796
2 changed files with 2 additions and 4 deletions
|
@ -74,9 +74,7 @@ String? _resolveLibPath(String name) {
|
||||||
// If lib is in Flutter's '.pub_cache' folder.
|
// If lib is in Flutter's '.pub_cache' folder.
|
||||||
final env = Platform.environment;
|
final env = Platform.environment;
|
||||||
if (env.containsKey('FLUTTER_ROOT')) {
|
if (env.containsKey('FLUTTER_ROOT')) {
|
||||||
final flutterPubCache =
|
libPath = checkCache(PubCache());
|
||||||
PubCache(Directory(path.join(env['FLUTTER_ROOT']!, '.pub-cache')));
|
|
||||||
libPath = checkCache(flutterPubCache);
|
|
||||||
if (_doesFileExist(libPath)) return libPath;
|
if (_doesFileExist(libPath)) return libPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -278,7 +278,7 @@ void main() {
|
||||||
expect(refs.first.localId, null);
|
expect(refs.first.localId, null);
|
||||||
expect(refs.first.name, 'HEAD');
|
expect(refs.first.name, 'HEAD');
|
||||||
expect(refs.first.symRef, 'refs/heads/master');
|
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.toString(), contains('RemoteReference{'));
|
||||||
expect(refs.first, remote.ls().first);
|
expect(refs.first, remote.ls().first);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue