File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import Utility
1818 - Returns: The modules that this manifest requires building
1919*/
2020public func get( manifest: Manifest , manifestParser: ( path: String , url: String ) throws -> Manifest ) throws -> [ Package ] {
21+ // Git 2.0 or higher is required
2122 if Git . majorVersionNumber < 2 {
2223 throw Error . ObsoleteGitVersion
2324 }
Original file line number Diff line number Diff line change @@ -63,6 +63,9 @@ public class Git {
6363 let prefixRange = version. startIndex... version. startIndex. advanced ( by: prefix. characters. count)
6464 version. removeSubrange ( prefixRange)
6565 }
66- return Int ( String ( version. characters. first!) )
66+ guard let first = version. characters. first else {
67+ return nil
68+ }
69+ return Int ( String ( first) )
6770 }
6871}
You can’t perform that action at this time.
0 commit comments