From 9391417b2d2761918c1a6f6f165fe1a35275cfb7 Mon Sep 17 00:00:00 2001 From: Quentin Machu Date: Tue, 24 Nov 2015 11:02:13 -0500 Subject: [PATCH] contrib: Wait for extraction to finish before continuing. --- contrib/analyze-local-images/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/analyze-local-images/main.go b/contrib/analyze-local-images/main.go index 147dc1c5..c0362d2b 100644 --- a/contrib/analyze-local-images/main.go +++ b/contrib/analyze-local-images/main.go @@ -142,6 +142,14 @@ func save(imageName string) (string, error) { if err != nil { return "", errors.New(stderr.String()) } + err = pipe.Close() + if err != nil { + return "", err + } + err = extract.Wait() + if err != nil { + return "", errors.New(stderr.String()) + } return path, nil }