From 3136a5654954ff3eb56cd0c999aa625226bf321a Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Wed, 21 Feb 2024 04:04:54 +0000 Subject: [PATCH] Add pub.dev to the hosted package URIs checked by the pub_get_offline script 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. --- tools/pub_get_offline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/pub_get_offline.py b/tools/pub_get_offline.py index fe167ae17662d..06d427a693048 100644 --- a/tools/pub_get_offline.py +++ b/tools/pub_get_offline.py @@ -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: