Delete application when container doesn't exist
This commit is contained in:
parent
ba748f1134
commit
f6f26e89de
1 changed files with 7 additions and 1 deletions
8
main.go
8
main.go
|
@ -457,10 +457,16 @@ func main() {
|
|||
App: app,
|
||||
}
|
||||
|
||||
err = container.Delete()
|
||||
status, err := container.Status()
|
||||
if err != nil {
|
||||
return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent)
|
||||
}
|
||||
if status != "no-container" {
|
||||
err = container.Delete()
|
||||
if err != nil {
|
||||
return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent)
|
||||
}
|
||||
}
|
||||
|
||||
err = apps.Delete(name)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue