throw exception when pull a repository and it is not set
This commit is contained in:
parent
e204ac1f9c
commit
0b43fc07d0
1 changed files with 3 additions and 0 deletions
|
|
@ -107,6 +107,9 @@ class PasswordStore {
|
|||
}
|
||||
|
||||
func pullRepository(transferProgressBlock: @escaping (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void) throws {
|
||||
if gitCredential == nil {
|
||||
throw NSError(domain: "me.mssun.pass.error", code: 1, userInfo: [NSLocalizedDescriptionKey: "Git Repository is not set."])
|
||||
}
|
||||
let credentialProvider = try gitCredential!.credentialProvider()
|
||||
let options: [String: Any] = [
|
||||
GTRepositoryRemoteOptionsCredentialProvider: credentialProvider
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue