mirror of https://github.com/hashicorp/packer
hcl2: don't warn on excluded post-processor (#12187)
* hcl2template: use && for chaining conditions For deciding if we need to run an error provisioner block, we checked using a nested if that we didn't need to avoid running it. This is unnecessary, and adds a superfluous level of inbrication to the code, so we chain both conditions with &&. * hcl2: don't warn on excluded post-processor When a post-processor is excluded through the -except command-line argument for packer build, we used to print a warning on HCL2 templates if this except statement did not match a build. However, since we can use the except option to avoid running post-processors, we should account for this as well when printing out a warning that there were no matches. This commit adds this counter to the except checks for the post-processors as well.pull/12246/head
parent
b2a98664c9
commit
79e989d03e
@ -0,0 +1,9 @@
|
||||
source "null" "test" {
|
||||
communicator = "none"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["null.test"]
|
||||
|
||||
post-processor "manifest" {}
|
||||
}
|
||||
Loading…
Reference in new issue