From bbb245defe670f4fd9b9159b154e0ba5aa93ec87 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 17 Nov 2014 18:06:48 +0200 Subject: [PATCH] Fix deleteImages() helper for multiple names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass every image name as separate argument. Signed-off-by: Tõnis Tiigi (github: tonistiigi) --- integration-cli/docker_utils.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integration-cli/docker_utils.go b/integration-cli/docker_utils.go index 61a616ceb2..58752bd04e 100644 --- a/integration-cli/docker_utils.go +++ b/integration-cli/docker_utils.go @@ -322,7 +322,10 @@ func deleteAllContainers() error { } func deleteImages(images ...string) error { - rmiCmd := exec.Command(dockerBinary, "rmi", strings.Join(images, " ")) + args := make([]string, 1, 2) + args[0] = "rmi" + args = append(args, images...) + rmiCmd := exec.Command(dockerBinary, args...) exitCode, err := runCommand(rmiCmd) // set error manually if not set if exitCode != 0 && err == nil {