chore(shorebird_cli): ignore .ios from xcodebuild (#987)

This commit is contained in:
Felix Angelov
2023-08-01 17:14:01 -05:00
committed by GitHub
parent 94d3ca5471
commit 16a0fbe237
@@ -1,6 +1,5 @@
import 'dart:io';
import 'package:collection/collection.dart';
import 'package:mason_logger/mason_logger.dart';
import 'package:path/path.dart' as p;
import 'package:scoped/scoped.dart';
@@ -58,14 +57,9 @@ class XcodeBuild {
/// Return Xcode project build info returned by `xcodebuild -list`
/// for the app at [projectPath].
Future<XcodeProjectBuildInfo> list(String projectPath) async {
// Flutter apps have ios files in root/ios
// Flutter modules have ios files in root/.ios
final iosRoot = [
Directory(p.join(projectPath, 'ios')),
Directory(p.join(projectPath, '.ios')),
].firstWhereOrNull((dir) => dir.existsSync());
final iosRoot = Directory(p.join(projectPath, 'ios'));
if (iosRoot == null) throw MissingIOSProjectException(projectPath);
if (!iosRoot.existsSync()) throw MissingIOSProjectException(projectPath);
const arguments = ['-list'];
final result = await process.run(