mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-07-14 01:57:32 +08:00
Was not handling nil here
This commit is contained in:
parent
54045d02f6
commit
6c651abfae
@ -136,7 +136,7 @@ func DeleteInstance(session *Session, instance *Instance) error {
|
||||
instance.conn.Close()
|
||||
}
|
||||
err := DeleteContainer(instance.Name)
|
||||
if !strings.Contains(err.Error(), "No such container") {
|
||||
if err != nil && !strings.Contains(err.Error(), "No such container") {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user