1
0
mirror of https://github.com/drone/drone-cli.git synced 2026-01-17 00:21:32 +01:00

Handle error when docker isn't running

This prevents drone from crashing if docker isn't running when calling
`drone exec`.
This commit is contained in:
Mikkel Oscar Lyderik 2016-02-27 00:11:09 +01:00
parent 9efffbe733
commit 7b4eb3b889

@ -279,6 +279,9 @@ func run(client dockerclient.Client, args []string, input string) (int, error) {
}
info, err := docker.Run(client, conf, false)
if err != nil {
return 0, err
}
client.StopContainer(info.Id, 15)
client.RemoveContainer(info.Id, true, true)