github.com/portworx/docker@v1.12.1/cliconfig/credentials/default_store.go (about) 1 package credentials 2 3 import ( 4 "os/exec" 5 6 "github.com/docker/docker/cliconfig/configfile" 7 ) 8 9 // DetectDefaultStore sets the default credentials store 10 // if the host includes the default store helper program. 11 func DetectDefaultStore(c *configfile.ConfigFile) { 12 if c.CredentialsStore != "" { 13 // user defined 14 return 15 } 16 17 if defaultCredentialsStore != "" { 18 if _, err := exec.LookPath(remoteCredentialsPrefix + defaultCredentialsStore); err == nil { 19 c.CredentialsStore = defaultCredentialsStore 20 } 21 } 22 }