From b6b6cba8c08f2997b7a4058c421d41744ef7793d Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Fri, 4 Apr 2025 15:47:43 -0700 Subject: [PATCH] fix: correct condition for extra_files to handle empty ref cases --- github_files.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github_files.tf b/github_files.tf index fdd479e..e526711 100644 --- a/github_files.tf +++ b/github_files.tf @@ -45,7 +45,7 @@ data "github_ref" "ref" { locals { extra_files = concat( var.extra_files, - local.lookup_sha == 1 && length(data.github_ref.ref) > 0 && data.github_ref.ref[0] != null ? [] : [ + local.lookup_sha == 1 && length(data.github_ref.ref) > 0 && length(data.github_ref.ref) == 0 ? [] : [ { path = ".TEMPLATE_SHA", content = local.lookup_sha == 1 && length(data.github_ref.ref) > 0 ? data.github_ref.ref[0].sha : ""