fixes #855 for docker-machine env on stopped machines

Signed-off-by: Ken Pepple <ken@solinea.com>
This commit is contained in:
Ken Pepple 2015-03-23 10:36:48 -07:00
parent aeb89ffc3c
commit df70e68b68
1 changed files with 4 additions and 0 deletions

View File

@ -673,6 +673,10 @@ func cmdEnv(c *cli.Context) {
log.Fatal(err)
}
if cfg.machineUrl == "" {
log.Fatalf("%s is not running. Please start this with docker-machine start %s", cfg.machineName, cfg.machineName)
}
dockerHost := cfg.machineUrl
if c.Bool("swarm") {
if !cfg.SwarmOptions.Master {