log available credentials before login
This commit is contained in:
parent
fbbeec5a2e
commit
72ef7b1f3f
24
docker.go
24
docker.go
@ -93,7 +93,20 @@ func (p Plugin) Exec() error {
|
||||
time.Sleep(time.Second * 1)
|
||||
}
|
||||
|
||||
// Create Auth Config File
|
||||
// for debugging purposes, log the type of authentication
|
||||
// credentials that have been provided.
|
||||
switch {
|
||||
case p.Login.Password != "" && p.Login.Config != "":
|
||||
fmt.Println("Detected registry credentials and registry credentials file")
|
||||
case p.Login.Password != "":
|
||||
fmt.Println("Detected registry credentials")
|
||||
case p.Login.Config != "":
|
||||
fmt.Println("Detected registry credentials file")
|
||||
default:
|
||||
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
|
||||
}
|
||||
|
||||
// create Auth Config File
|
||||
if p.Login.Config != "" {
|
||||
os.MkdirAll(dockerHome, 0600)
|
||||
|
||||
@ -116,15 +129,6 @@ func (p Plugin) Exec() error {
|
||||
}
|
||||
}
|
||||
|
||||
switch {
|
||||
case p.Login.Password != "":
|
||||
fmt.Println("Detected registry credentials")
|
||||
case p.Login.Config != "":
|
||||
fmt.Println("Detected registry credentials file")
|
||||
default:
|
||||
fmt.Println("Registry credentials or Docker config not provided. Guest mode enabled.")
|
||||
}
|
||||
|
||||
if p.Build.Squash && !p.Daemon.Experimental {
|
||||
fmt.Println("Squash build flag is only available when Docker deamon is started with experimental flag. Ignoring...")
|
||||
p.Build.Squash = false
|
||||
|
Loading…
Reference in New Issue
Block a user