1
0
mirror of https://github.com/hashicorp/packer.git synced 2026-02-05 12:45:10 +01:00
Files
Lucas Bajolet 4cd7ad4721 hcl2template: err on malformed local/data dep (#13340)
* hcl2template: err on malformed local/data dep

When introducing the DAG for locals and datasources, we forgot to handle
one limit case: if a dependency for a local or data is malformed, we
didn't check that a vertex was associated to it, leading to the final
DAG being malformed, and the DAG library would crash in this case.

This commit fixes this problem by checking that the dependency does
exist before attempting to add it to the graph as an edge for a vertex,
so that it is reported accurately, and do that Packer doesn't crash.

* error message change

---------

Co-authored-by: anshul sharma <anshul.sharma@hashicorp.com>
2025-06-17 09:22:09 +05:30
..