• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

gitリポジトリのurlを貼り付けるだけでアプリケーションのビルドを実行するアプリ。 macOS用


Commit MetaInfo

修订版9cc2b5bf960d235952a5cf45440f355d499c52cd (tree)
时间2018-05-25 23:27:58
作者masakih <masakih@user...>
Commitermasakih

Log Message

chatchで分岐するようにした

更改概述

差异

--- a/AppBuilderWithGit/Git.swift
+++ b/AppBuilderWithGit/Git.swift
@@ -47,23 +47,20 @@ final class Git {
4747
4848 return
4949
50- } catch {
51-
52- guard let e = error as? GitError else {
53-
54- completeHandler?(GitError.other("Unknown Error: \(error)"))
55- return
56- }
50+ } catch let error as GitError {
5751
58- switch e {
52+ if case let .gitError(stat, _) = error, stat == 128 {
5953
60- case let .gitError(stat, _) where stat == 128:
6154 tryPull(completeHandler: completeHandler)
6255
63- default:
64- completeHandler?(e)
56+ } else {
57+
58+ completeHandler?(error)
6559 }
6660
61+ } catch {
62+
63+ completeHandler?(GitError.other("Unknown Error: \(error)"))
6764 }
6865
6966 }
@@ -157,14 +154,13 @@ final class Git {
157154
158155 completeHandler?(GitError.none)
159156
157+ } catch let error as GitError {
158+
159+ completeHandler?(error)
160+
160161 } catch {
161162
162- switch error {
163-
164- case let e as GitError: completeHandler?(e)
165-
166- default: completeHandler?(GitError.other("Unknown Error: \(error)"))
167- }
163+ completeHandler?(GitError.other("Unknown Error: \(error)"))
168164 }
169165 }
170166