@@ -57,13 +57,20 @@ struct HistoryCommand: AsyncParsableCommand {
5757 let current = try await GitLogEntry . current. process ( pod: pod, podfile: String ( contentsOf: podfileURL) , target: currentTargetDependencies)
5858
5959 // process Podfile.lock for past commits
60- let output = try await withThrowingTaskGroup ( of: HistoryStatsOutput . self, returning: [ HistoryStatsOutput ] . self) { group in
60+
61+ let output = await withTaskGroup ( of: HistoryStatsOutput ? . self, returning: [ HistoryStatsOutput ] . self) { group in
6162
6263 for entry in logs. lazy {
6364 group. addTask {
64- let podfile = try shell ( " git show \( entry. revision) :Podfile " , at: directoryURL)
65- let entryTargetDependencies = try moduleFromPodfile ( podfile, on: target) ?? . init( name: target, dependencies: [ ] )
66- return try await entry. process (
65+
66+ guard
67+ let podfile = try ? shell ( " git show \( entry. revision) :Podfile " , at: directoryURL) ,
68+ let entryTargetDependencies = try ? moduleFromPodfile ( podfile, on: target) ?? . init( name: target, dependencies: [ ] )
69+ else {
70+ return nil
71+ }
72+
73+ return try ? await entry. process (
6774 pod: pod,
6875 podfile: shell ( " git show \( entry. revision) :Podfile.lock " , at: directoryURL) ,
6976 target: entryTargetDependencies
@@ -72,7 +79,7 @@ struct HistoryCommand: AsyncParsableCommand {
7279 }
7380
7481 var rows : [ HistoryStatsOutput ] = [ ]
75- for try await row in group {
82+ for await row in group. compactMap ( { $0 } ) {
7683 rows. append ( row)
7784 }
7885 return rows
0 commit comments