From fa635a5b27dff942614cbaaaab4858083801e3fe Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 20 Feb 2024 20:45:53 -0800 Subject: [PATCH] Add pub.dev to the hosted package URIs checked by the pub_get_offline script (flutter/engine#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. --- engine/src/flutter/tools/pub_get_offline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/pub_get_offline.py b/engine/src/flutter/tools/pub_get_offline.py index fe167ae176..06d427a693 100644 --- a/engine/src/flutter/tools/pub_get_offline.py +++ b/engine/src/flutter/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: