fix crash that occurs when dir is nil
This commit is contained in:
parent
89fb8f0d3e
commit
ec75913412
|
@ -49,8 +49,11 @@ func (a *artifact) State(name string) interface{} {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *artifact) Destroy() error {
|
func (a *artifact) Destroy() error {
|
||||||
|
if a.dir != nil {
|
||||||
return a.dir.RemoveAll()
|
return a.dir.RemoveAll()
|
||||||
}
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func NewArtifact(remoteType string, format string, exportOutputPath string, vmName string, skipExport bool, keepRegistered bool, state multistep.StateBag) (packer.Artifact, error) {
|
func NewArtifact(remoteType string, format string, exportOutputPath string, vmName string, skipExport bool, keepRegistered bool, state multistep.StateBag) (packer.Artifact, error) {
|
||||||
var files []string
|
var files []string
|
||||||
|
|
Loading…
Reference in New Issue