Merge pull request #7116 from DanHam/fix-nil-artifact-dir

VMware-ISO: Fix bug caused by 'nil' dir field in artifact struct when building locally
This commit is contained in:
Adrien Delorme 2018-12-14 17:06:47 +01:00 committed by GitHub
commit 74abd80c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 { if remoteType != "" && !skipExport {
dir = new(LocalOutputDir) dir = new(LocalOutputDir)
dir.SetOutputDir(exportOutputPath) dir.SetOutputDir(exportOutputPath)
files, err = dir.ListFiles()
} else { } else {
files, err = state.Get("dir").(OutputDir).ListFiles() dir = state.Get("dir").(OutputDir)
} }
files, err = dir.ListFiles()
if err != nil { if err != nil {
return nil, err return nil, err
} }