mirror of https://github.com/docker/docs.git
fixes error when running config against no active host
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
parent
4a81c4b17f
commit
7ce53190cf
|
@ -540,15 +540,21 @@ func getMachineConfig(c *cli.Context) (*machineConfig, error) {
|
|||
if err != nil {
|
||||
log.Fatalf("error getting active host: %v", err)
|
||||
}
|
||||
if m == nil {
|
||||
return nil, fmt.Errorf("There is no active host")
|
||||
}
|
||||
machine = m
|
||||
} else {
|
||||
m, err := store.Load(name)
|
||||
fmt.Println(err)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Error loading machine config: %s", err)
|
||||
}
|
||||
machine = m
|
||||
}
|
||||
|
||||
fmt.Println(machine)
|
||||
|
||||
caCert := filepath.Join(utils.GetMachineClientCertDir(), "ca.pem")
|
||||
clientCert := filepath.Join(utils.GetMachineClientCertDir(), "cert.pem")
|
||||
clientKey := filepath.Join(utils.GetMachineClientCertDir(), "key.pem")
|
||||
|
|
Loading…
Reference in New Issue