Skip to content

Commit fd6baba

Browse files
authored
Allow spaces in SDK path in flutter_tools tests (flutter#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.
1 parent cb53e4e commit fd6baba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/flutter_tools/test/src/common.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ String getFlutterRoot() {
3232
scriptUri = platform.script;
3333
break;
3434
case 'data':
35-
final RegExp flutterTools = new RegExp(r'(file://[^%]*[/\\]flutter_tools[^%]+\.dart)%');
35+
final RegExp flutterTools = new RegExp(r'(file://[^ ;]*[/\\]flutter_tools[^%]+\.dart)%');
3636
final Match match = flutterTools.firstMatch(platform.script.path);
3737
if (match == null)
3838
throw invalidScript();

0 commit comments

Comments
 (0)