Merge pull request #7745 from LK4D4/fix_docker_host_panic

Fix panic for DOCKER_HOST without ://
This commit is contained in:
Michael Crosby 2014-08-26 11:23:30 -07:00
commit b458dd1dfb
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@ func main() {
// If we do not have a host, default to unix socket
defaultHost = fmt.Sprintf("unix://%s", api.DEFAULTUNIXSOCKET)
}
if _, err := api.ValidateHost(defaultHost); err != nil {
defaultHost, err := api.ValidateHost(defaultHost)
if err != nil {
log.Fatal(err)
}
flHosts = append(flHosts, defaultHost)