diff --git a/bin/update_sops.sh b/bin/update_sops.sh index 1beaf65..cf91834 100755 --- a/bin/update_sops.sh +++ b/bin/update_sops.sh @@ -103,8 +103,11 @@ function fn_sops_locate_config_in_git_repo(){ search_dir="${start_dir}" contender="${search_dir}/.sops.yaml" # base case - located the file OR stopping condition - at top of repo - if [[ -e "${contender}" ]] || [[ "${search_dir}" == "${stop_dir}" ]]; then - >&2 echo "# BASE CASE" + if [[ -e "${contender}" ]]; then + >&2 echo "# BASE CASE: found ${contender}" + echo "${contender}" + elif [[ "${search_dir}" == "${stop_dir}" ]]; then + >&2 echo "# STOPPING CONDITION: no sops config found, suggesting: ${contender}" echo "${contender}" else >&2 echo "# walk up one dir..."