From a4ab5f981ffd7f368545e1629cd4fac9c35aa1d7 Mon Sep 17 00:00:00 2001 From: justusbunsi Date: Thu, 4 Aug 2022 21:46:04 +0800 Subject: [PATCH] Skip processing non-provided additional configs (#336) Reviewed-on: https://gitea.com/gitea/helm-chart/pulls/336 Reviewed-by: luhahn Reviewed-by: Lunny Xiao Co-authored-by: justusbunsi Co-committed-by: justusbunsi --- templates/gitea/config.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/templates/gitea/config.yaml b/templates/gitea/config.yaml index 73104e6..bcc7c4d 100644 --- a/templates/gitea/config.yaml +++ b/templates/gitea/config.yaml @@ -117,13 +117,15 @@ stringData: function env2ini::load_config_sources() { local path="${1}" - env2ini::log "Processing $(basename "${path}")..." + if [[ -d "${path}" ]]; then + env2ini::log "Processing $(basename "${path}")..." - while read -d '' configFile; do - env2ini::process_config_file "${configFile}" - done < <(find "${path}" -type l -not -name '..data' -print0) + while read -d '' configFile; do + env2ini::process_config_file "${configFile}" + done < <(find "${path}" -type l -not -name '..data' -print0) - env2ini::log "\n" + env2ini::log "\n" + fi } function env2ini::generate_initial_secrets() {