@@ -138,17 +138,7 @@ struct Xcodes: ParsableCommand {
138138
139139 installer. download ( installation, dataSource: globalDataSource. dataSource, downloader: downloader, destinationDirectory: destination)
140140 . catch { error in
141- switch error {
142- case Process . PMKError . execution( let process, let standardOutput, let standardError) :
143- Current . logging. log ( """
144- Failed executing: ` \( process) ` ( \( process. terminationStatus) )
145- \( [ standardOutput, standardError] . compactMap { $0 } . joined ( separator: " \n " ) )
146- """ . red)
147- default :
148- Current . logging. log ( error. legibleLocalizedDescription. red)
149- }
150-
151- Install . exit ( withError: ExitCode . failure)
141+ Install . processDownloadOrInstall ( error: error)
152142 }
153143
154144 RunLoop . current. run ( )
@@ -231,17 +221,7 @@ struct Xcodes: ParsableCommand {
231221 installer. install ( installation, dataSource: globalDataSource. dataSource, downloader: downloader, destination: destination)
232222 . done { Install . exit ( ) }
233223 . catch { error in
234- switch error {
235- case Process . PMKError . execution( let process, let standardOutput, let standardError) :
236- Current . logging. log ( """
237- Failed executing: ` \( process) ` ( \( process. terminationStatus) )
238- \( [ standardOutput, standardError] . compactMap { $0 } . joined ( separator: " \n " ) )
239- """ . red)
240- default :
241- Current . logging. log ( error. legibleLocalizedDescription. red)
242- }
243-
244- Install . exit ( withError: ExitCode . failure)
224+ Install . processDownloadOrInstall ( error: error)
245225 }
246226
247227 RunLoop . current. run ( )
0 commit comments