mirror of https://github.com/docker/docs.git
Merge pull request #648 from nathanleclaire/fix_active_multi
Fix active host implementation for start, stop, etc.
This commit is contained in:
commit
3969aeed58
10
commands.go
10
commands.go
|
@ -630,6 +630,16 @@ func runActionWithContext(actionName string, c *cli.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// No args specified, so use active.
|
||||||
|
if len(machines) == 0 {
|
||||||
|
store := NewStore(utils.GetMachineDir(), c.GlobalString("tls-ca-cert"), c.GlobalString("tls-ca-key"))
|
||||||
|
activeHost, err := store.GetActive()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Unable to get active host: %v", err)
|
||||||
|
}
|
||||||
|
machines = []*Host{activeHost}
|
||||||
|
}
|
||||||
|
|
||||||
runActionForeachMachine(actionName, machines)
|
runActionForeachMachine(actionName, machines)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue