From 33a1d82f51d24e135d6574f8e9691987102ee56c Mon Sep 17 00:00:00 2001 From: Allen Houchins <32207388+allenhouchins@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:37:36 -0600 Subject: [PATCH] Fix unbound variable error in detect-new-fmas-in-pr.sh (#36613) --- .github/scripts/detect-new-fmas-in-pr.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/detect-new-fmas-in-pr.sh b/.github/scripts/detect-new-fmas-in-pr.sh index 4107a376e2..bd68d02c7d 100755 --- a/.github/scripts/detect-new-fmas-in-pr.sh +++ b/.github/scripts/detect-new-fmas-in-pr.sh @@ -50,7 +50,11 @@ extract_slugs_from_changed_manifests() { done <<< "$changed_files" # Remove duplicates and sort - printf '%s\n' "${slugs[@]}" | sort -u + if [ ${#slugs[@]} -eq 0 ]; then + echo "" + else + printf '%s\n' "${slugs[@]}" | sort -u + fi } # Get changed files in outputs directory