Fix 'nil' dir in VMware artifact when building locally

This commit is contained in:
DanHam 2018-12-14 12:46:38 +00:00
parent 2045390e74
commit 0821653256
No known key found for this signature in database
GPG Key ID: 58E79AEDD6AA987E
1 changed files with 2 additions and 2 deletions

View File

@ -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
}