From 0821653256697896ce642033f356286aae5ca544 Mon Sep 17 00:00:00 2001 From: DanHam Date: Fri, 14 Dec 2018 12:46:38 +0000 Subject: [PATCH] Fix 'nil' dir in VMware artifact when building locally --- builder/vmware/common/artifact.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/vmware/common/artifact.go b/builder/vmware/common/artifact.go index c9fa075d2..e9b02237e 100644 --- a/builder/vmware/common/artifact.go +++ b/builder/vmware/common/artifact.go @@ -62,10 +62,10 @@ func NewArtifact(remoteType string, format string, exportOutputPath string, vmNa if remoteType != "" && !skipExport { dir = new(LocalOutputDir) dir.SetOutputDir(exportOutputPath) - files, err = dir.ListFiles() } else { - files, err = state.Get("dir").(OutputDir).ListFiles() + dir = state.Get("dir").(OutputDir) } + files, err = dir.ListFiles() if err != nil { return nil, err }