Skip to content

Commit

Permalink
Add pub.dev to the hosted package URIs checked by the pub_get_offline…
Browse files Browse the repository at this point in the history
… script (flutter#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.
  • Loading branch information
jason-simmons authored Feb 21, 2024
1 parent efc6994 commit 3c2c3a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/pub_get_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def check_package(package):
for package_data in packages_data:
package_uri = package_data['rootUri']
package_name = package_data['name']
if '.pub-cache' in package_uri and 'pub.dartlang.org' in package_uri:
if '.pub-cache' in package_uri and ('pub.dartlang.org' in package_uri or
'pub.dev' in package_uri):
print('Error: package "%s" was fetched from pub' % package_name)
pub_count = pub_count + 1
if pub_count > 0:
Expand Down

0 comments on commit 3c2c3a0

Please sign in to comment.