mirror of
https://github.com/docker/docs.git
synced 2026-04-03 01:38:58 +07:00
Merge pull request #487 from ehazlett/fix-config-no-machine
fixes error when running config against no active host
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user