1
0
mirror of https://github.com/drone/drone-cli.git synced 2024-11-23 17:22:09 +01:00

Pull drone exec image on --pull argument

This commit is contained in:
Thomas Frössman 2016-01-30 16:11:31 +01:00
parent 18441319ec
commit 48146d05a3

@ -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)