@@ -138,17 +138,7 @@ struct Xcodes: ParsableCommand {
138
138
139
139
installer. download ( installation, dataSource: globalDataSource. dataSource, downloader: downloader, destinationDirectory: destination)
140
140
. 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)
152
142
}
153
143
154
144
RunLoop . current. run ( )
@@ -231,17 +221,7 @@ struct Xcodes: ParsableCommand {
231
221
installer. install ( installation, dataSource: globalDataSource. dataSource, downloader: downloader, destination: destination)
232
222
. done { Install . exit ( ) }
233
223
. 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)
245
225
}
246
226
247
227
RunLoop . current. run ( )
0 commit comments