From a4e417c66799a3da96ee8eec1d9278f2f736aba4 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Wed, 20 May 2026 01:46:04 +0000 Subject: [PATCH] fix(ci): handle empty env vars in repo-health with set -u REPO_DISALLOWED_DIRS and SCRIPTS_REQUIRED_DIRS can be empty, which causes exit code 2 under set -u. Use ${VAR:-} pattern. Authored-by: Moko Consulting --- .gitea/workflows/repo-health.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/repo-health.yml b/.gitea/workflows/repo-health.yml index 90c86c2..f513a36 100644 --- a/.gitea/workflows/repo-health.yml +++ b/.gitea/workflows/repo-health.yml @@ -288,7 +288,7 @@ jobs: exit 0 fi - IFS=',' read -r -a required_dirs <<< "${SCRIPTS_REQUIRED_DIRS}" + IFS=',' read -r -a required_dirs <<< "${SCRIPTS_REQUIRED_DIRS:-}" IFS=',' read -r -a allowed_dirs <<< "${SCRIPTS_ALLOWED_DIRS}" missing_dirs=() @@ -394,8 +394,8 @@ jobs: IFS=',' read -r -a required_artifacts <<< "${REPO_REQUIRED_ARTIFACTS}" IFS=',' read -r -a optional_files <<< "${REPO_OPTIONAL_FILES}" - IFS=',' read -r -a disallowed_dirs <<< "${REPO_DISALLOWED_DIRS}" - IFS=',' read -r -a disallowed_files <<< "${REPO_DISALLOWED_FILES}" + IFS=',' read -r -a disallowed_dirs <<< "${REPO_DISALLOWED_DIRS:-}" + IFS=',' read -r -a disallowed_files <<< "${REPO_DISALLOWED_FILES:-}" missing_required=() missing_optional=()