From f1eae75389c30f6f0973ff41aae4f8511115f467 Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sat, 31 Aug 2013 21:55:52 -0700 Subject: [PATCH] If no image is generated, just return nil for the Openstack provider This mirrors what is done in other providers e.g. Amazon providers --- builder/openstack/builder.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/openstack/builder.go b/builder/openstack/builder.go index 57caefff9..9882ea032 100644 --- a/builder/openstack/builder.go +++ b/builder/openstack/builder.go @@ -112,6 +112,11 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe return nil, rawErr.(error) } + // If there are no images, then just return + if _, ok := state.GetOk("image"); !ok { + return nil, nil + } + // Build the artifact and return it artifact := &Artifact{ ImageId: state.Get("image").(string),