Skip to content

Commit b6adfca

Browse files
committed
Refine main project detection. #51
1 parent 32f512e commit b6adfca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/Shark/CLI/XcodeProjectHelper.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ struct XcodeProjectHelper {
3232
func resourcePaths() async throws -> ResourcePaths {
3333

3434
let xcodeproj = try await mapper.map(at: self.projectPath)
35-
guard let mainProject = xcodeproj.projects.values.first(where: { $0.schemes.count >= 2 }) else { return .init() }
35+
guard let mainProject = xcodeproj.projects.values.first(where: { !$0.schemes.isEmpty }) else {
36+
print("Could not find main project")
37+
exit(EXIT_FAILURE)
38+
}
3639

3740
let selectedTarget: Target
3841

0 commit comments

Comments
 (0)