mirror of https://github.com/cirruslabs/tart.git
Introduce TART_REGISTRY_HOSTNAME (#545)
* Introduce TART_REGISTRY_HOST * TART_REGISTRY_HOST → TART_REGISTRY_HOSTNAME
This commit is contained in:
parent
7592b86663
commit
3a2cba6929
|
|
@ -2,6 +2,11 @@ import Foundation
|
|||
|
||||
class EnvironmentCredentialsProvider: CredentialsProvider {
|
||||
func retrieve(host: String) throws -> (String, String)? {
|
||||
if let tartRegistryHostname = ProcessInfo.processInfo.environment["TART_REGISTRY_HOSTNAME"],
|
||||
tartRegistryHostname != host {
|
||||
return nil
|
||||
}
|
||||
|
||||
let username = ProcessInfo.processInfo.environment["TART_REGISTRY_USERNAME"]
|
||||
let password = ProcessInfo.processInfo.environment["TART_REGISTRY_PASSWORD"]
|
||||
if let username = username, let password = password {
|
||||
|
|
|
|||
Loading…
Reference in New Issue