mirror of https://github.com/cirruslabs/tart.git
Credential helpers: "credHelpers" map is optional in Docker's config (#209)
This commit is contained in:
parent
c54b140750
commit
6296df7c0c
|
|
@ -7,8 +7,8 @@ class HelperProgramCredentialsProvider: CredentialsProvider {
|
|||
return nil
|
||||
}
|
||||
let config = try JSONDecoder().decode(DockerConfig.self, from: Data(contentsOf: dockerConfigURL))
|
||||
|
||||
if let helperProgram = config.credHelpers[host] {
|
||||
|
||||
if let helperProgram = config.credHelpers?[host] {
|
||||
return try executeHelper(binaryName: "docker-credential-\(helperProgram)", host: host)
|
||||
}
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ class HelperProgramCredentialsProvider: CredentialsProvider {
|
|||
}
|
||||
|
||||
struct DockerConfig: Codable {
|
||||
var credHelpers: Dictionary<String, String> = Dictionary()
|
||||
var credHelpers: Dictionary<String, String>? = Dictionary()
|
||||
}
|
||||
|
||||
struct DockerGetOutput: Codable {
|
||||
|
|
|
|||
Loading…
Reference in New Issue