Unverified Commit 8507b72a authored by Mikkel Nygaard Ravn's avatar Mikkel Nygaard Ravn Committed by GitHub

Fix xcode build settings parsing (#14672)

parent ea4dc124
......@@ -12,7 +12,7 @@ import '../build_info.dart';
import '../cache.dart';
import '../globals.dart';
final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(\S+)');
final RegExp _settingExpr = new RegExp(r'(\w+)\s*=\s*(.*)$');
final RegExp _varExpr = new RegExp(r'\$\((.*)\)');
String flutterFrameworkDir(BuildMode mode) {
......@@ -77,9 +77,10 @@ Map<String, String> getXcodeBuildSettings(String xcodeProjPath, String target) {
Map<String, String> parseXcodeBuildSettings(String showBuildSettingsOutput) {
final Map<String, String> settings = <String, String>{};
for (String line in showBuildSettingsOutput.split('\n').where(_settingExpr.hasMatch)) {
final Match match = _settingExpr.firstMatch(line);
settings[match[1]] = match[2];
for (Match match in showBuildSettingsOutput.split('\n').map(_settingExpr.firstMatch)) {
if (match != null) {
settings[match[1]] = match[2];
}
}
return settings;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment