logging updates from @nathanleclaire

Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
This commit is contained in:
Evan Hazlett 2015-01-07 17:37:17 -08:00
parent 414f94b7d1
commit df5ecadf80
No known key found for this signature in database
GPG Key ID: A519480096146526
1 changed files with 4 additions and 3 deletions

View File

@ -194,11 +194,12 @@ func cmdCreate(c *cli.Context) {
if c.GlobalBool("debug") {
log.Fatal(err)
} else {
log.Warnf("Removing provisioned machine. Use --debug to prevent removal.")
log.Warnf("Removing created machine. You can run machine with the --debug flag to avoid this.")
// we know there was an error so do not check for the error on removal
// instead we will Fatal with a message to prevent spamming with error messages
store.Remove(name, true)
log.Fatalf("You will want to check the provider to make sure the machine and associated resources were properly removed.")
_ = store.Remove(name, true)
log.Warn("You will want to check the provider to make sure the machine and associated resources were properly removed.")
log.Fatal("Error creating machine")
}
}
if err := store.SetActive(host); err != nil {