mirror of
https://github.com/hashicorp/packer.git
synced 2026-05-28 04:35:38 -04:00
Merge pull request #9318 from hashicorp/fix_build_prepare_failure_handling
move this to after the prepare() is successful so that we don't try t…
This commit is contained in:
commit
193395d734
1 changed files with 3 additions and 1 deletions
|
|
@ -215,7 +215,6 @@ func (c *Core) GetBuilds(opts GetBuildsOptions) ([]Build, hcl.Diagnostics) {
|
|||
})
|
||||
continue
|
||||
}
|
||||
builds = append(builds, b)
|
||||
|
||||
// Now that build plugin has been launched, call Prepare()
|
||||
log.Printf("Preparing build: %s", b.Name())
|
||||
|
|
@ -233,6 +232,9 @@ func (c *Core) GetBuilds(opts GetBuildsOptions) ([]Build, hcl.Diagnostics) {
|
|||
continue
|
||||
}
|
||||
|
||||
// Only append builds to list if the Prepare() is successful.
|
||||
builds = append(builds, b)
|
||||
|
||||
if len(warnings) > 0 {
|
||||
for _, warning := range warnings {
|
||||
diags = append(diags, &hcl.Diagnostic{
|
||||
|
|
|
|||
Loading…
Reference in a new issue