Skip to content

Commit

Permalink
Fix deleteImages() helper for multiple names
Browse files Browse the repository at this point in the history
Pass every image name as separate argument.

Signed-off-by: Tõnis Tiigi <[email protected]> (github: tonistiigi)
  • Loading branch information
tonistiigi committed Nov 19, 2014
1 parent da3d3b9 commit bbb245d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion integration-cli/docker_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bbb245d

Please sign in to comment.