Allow spaces in SDK path in flutter_tools tests (#14617)

The Flutter engine now supports package: and file: imports that resolve
to paths on disk that include spaces and other URI-escaped characters.
This patch eliminates the restriction that Dart source paths not include
%20 (or other URI-escaped characters) in their paths in flutter_tool
tests.
This commit is contained in:
Chris Bracken 2018-02-09 21:43:08 -08:00 committed by GitHub
parent cb53e4e5aa
commit fd6baba137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ String getFlutterRoot() {
scriptUri = platform.script;
break;
case 'data':
final RegExp flutterTools = new RegExp(r'(file://[^%]*[/\\]flutter_tools[^%]+\.dart)%');
final RegExp flutterTools = new RegExp(r'(file://[^ ;]*[/\\]flutter_tools[^%]+\.dart)%');
final Match match = flutterTools.firstMatch(platform.script.path);
if (match == null)
throw invalidScript();