Merge pull request #38 from zeerorg/delete_Create

[Enhancement] Delete a cluster if it encounters error when starting (@zeerorg)
pull/39/head
Thorsten Klein 5 years ago committed by GitHub
commit 5b73df5f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      cli/commands.go

@ -113,7 +113,12 @@ func CreateCluster(c *cli.Context) error {
publishedPorts,
)
if err != nil {
log.Fatalf("ERROR: failed to create cluster\n%+v", err)
log.Printf("ERROR: failed to create cluster\n%+v", err)
delErr := DeleteCluster(c)
if delErr != nil {
return delErr
}
os.Exit(1)
}
ctx := context.Background()

Loading…
Cancel
Save