mirror of
https://github.com/flutter/flutter
synced 2024-10-12 19:23:02 +00:00
Allow local networking Info.plist insertion to fail (#78085)
This commit is contained in:
parent
9f4e132fb8
commit
d0a29dc10c
|
@ -235,8 +235,10 @@ AddObservatoryBonjourService() {
|
|||
local built_products_plist="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}"
|
||||
|
||||
if [[ ! -f "${built_products_plist}" ]]; then
|
||||
EchoError "error: ${INFOPLIST_PATH} does not exist. The Flutter \"Thin Binary\" build phase must run after \"Copy Bundle Resources\"."
|
||||
exit -1
|
||||
# Very occasionally Xcode hasn't created an Info.plist when this runs.
|
||||
# The file will be present on re-run.
|
||||
echo "${INFOPLIST_PATH} does not exist. Skipping _dartobservatory._tcp NSBonjourServices insertion. Try re-building to enable \"flutter attach\"."
|
||||
return
|
||||
fi
|
||||
# If there are already NSBonjourServices specified by the app (uncommon), insert the observatory service name to the existing list.
|
||||
if plutil -extract NSBonjourServices xml1 -o - "${built_products_plist}"; then
|
||||
|
|
|
@ -96,7 +96,7 @@ void main() {
|
|||
infoPlist = buildDirectory.childFile('Info.plist');
|
||||
});
|
||||
|
||||
test('fails when the Info.plist is missing', () async {
|
||||
test('handles when the Info.plist is missing', () async {
|
||||
final ProcessResult result = await Process.run(
|
||||
xcodeBackendPath,
|
||||
<String>['test_observatory_bonjour_service'],
|
||||
|
@ -106,8 +106,8 @@ void main() {
|
|||
'INFOPLIST_PATH': 'Info.plist',
|
||||
},
|
||||
);
|
||||
expect(result.stderr, startsWith('error: Info.plist does not exist.'));
|
||||
expect(result.exitCode, isNot(0));
|
||||
expect(result.stdout, contains('Info.plist does not exist.'));
|
||||
expect(result.exitCode, 0);
|
||||
});
|
||||
|
||||
const String emptyPlist = '''
|
||||
|
|
Loading…
Reference in a new issue