Skip to content

Commit

Permalink
fix: correct condition for extra_files to handle empty ref cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Apr 4, 2025
1 parent 451e922 commit b6b6cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github_files.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 : ""
Expand Down

0 comments on commit b6b6cba

Please sign in to comment.