Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3c2c3a0

Browse files
Add pub.dev to the hosted package URIs checked by the pub_get_offline script (#50811)
pub get --offline may fetch packages that are in the local package cache but were previously downloaded from a hosted source. The script needs to check for packages that came from either the old or new locations of the Dart hosted package repository.
1 parent efc6994 commit 3c2c3a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/pub_get_offline.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def check_package(package):
7272
for package_data in packages_data:
7373
package_uri = package_data['rootUri']
7474
package_name = package_data['name']
75-
if '.pub-cache' in package_uri and 'pub.dartlang.org' in package_uri:
75+
if '.pub-cache' in package_uri and ('pub.dartlang.org' in package_uri or
76+
'pub.dev' in package_uri):
7677
print('Error: package "%s" was fetched from pub' % package_name)
7778
pub_count = pub_count + 1
7879
if pub_count > 0:

0 commit comments

Comments
 (0)