From 69b0e66b5d59d78a087aacc9970559fbbba71a4f Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Mon, 27 Jul 2020 08:52:29 -0700 Subject: [PATCH] Update post-processor/vsphere/post-processor.go Co-authored-by: Adrien Delorme --- post-processor/vsphere/post-processor.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/post-processor/vsphere/post-processor.go b/post-processor/vsphere/post-processor.go index ff6615ebb..1074097db 100644 --- a/post-processor/vsphere/post-processor.go +++ b/post-processor/vsphere/post-processor.go @@ -222,7 +222,10 @@ func (p *PostProcessor) ValidateOvfTool(args []string, ofvtool string) error { // Need to manually close stdin or else the ofvtool call will hang // forever in a situation where the user has provided an invalid // password or username - stdin, _ := cmd.StdinPipe() + stdin, err := cmd.StdinPipe() + if err != nil { + err + } defer stdin.Close() if err := cmd.Run(); err != nil {