From 48146d05a388ca388f160041f8f77f51d53d784d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Fr=C3=B6ssman?= Date: Sat, 30 Jan 2016 16:11:31 +0100 Subject: [PATCH] Pull drone exec image on --pull argument --- drone/exec.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drone/exec.go b/drone/exec.go index 8d5180a..f82d2f4 100644 --- a/drone/exec.go +++ b/drone/exec.go @@ -136,6 +136,15 @@ func execCmd(c *cli.Context) error { execArgs = append(execArgs, "--"+arg) } } + if c.Bool("pull") { + image := "drone/drone-exec:latest" + color.Magenta("[DRONE] pulling %s", image) + err := cli.PullImage(image, nil) + if err != nil { + color.Red("[DRONE] failed to pull %s", image) + os.Exit(1) + } + } proj := resolvePath(pwd)