Browse code

Fix deleteImages() helper for multiple names

Pass every image name as separate argument.

Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)

Tonis Tiigi authored on 2014/11/18 01:06:48
Showing 1 changed files
... ...
@@ -322,7 +322,10 @@ func deleteAllContainers() error {
322 322
 }
323 323
 
324 324
 func deleteImages(images ...string) error {
325
-	rmiCmd := exec.Command(dockerBinary, "rmi", strings.Join(images, " "))
325
+	args := make([]string, 1, 2)
326
+	args[0] = "rmi"
327
+	args = append(args, images...)
328
+	rmiCmd := exec.Command(dockerBinary, args...)
326 329
 	exitCode, err := runCommand(rmiCmd)
327 330
 	// set error manually if not set
328 331
 	if exitCode != 0 && err == nil {