From fcb4b1ec4037cb61126fa99b53a55aa06cd33582 Mon Sep 17 00:00:00 2001 From: Agent Date: Fri, 3 Apr 2026 07:43:48 +0000 Subject: [PATCH] fix: fix: disinto release fails to load FORGE_OPS_REPO from project config (#180) --- bin/disinto | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bin/disinto b/bin/disinto index a5681b8..aaa8473 100755 --- a/bin/disinto +++ b/bin/disinto @@ -2892,9 +2892,18 @@ disinto_release() { fi # Load project config to get FORGE_OPS_REPO - local project_toml="${FACTORY_ROOT}/projects/${PROJECT_NAME}.toml" - if [ -n "${PROJECT_NAME:-}" ] && [ -f "$project_toml" ]; then - source "${FACTORY_ROOT}/lib/load-project.sh" "$project_toml" + if [ -z "${PROJECT_NAME:-}" ]; then + # PROJECT_NAME is unset - detect project TOML from projects/ directory + local found_toml + found_toml=$(find "${FACTORY_ROOT}/projects" -maxdepth 1 -name "*.toml" ! -name "*.example" 2>/dev/null | head -1) + if [ -n "$found_toml" ]; then + source "${FACTORY_ROOT}/lib/load-project.sh" "$found_toml" + fi + else + local project_toml="${FACTORY_ROOT}/projects/${PROJECT_NAME}.toml" + if [ -f "$project_toml" ]; then + source "${FACTORY_ROOT}/lib/load-project.sh" "$project_toml" + fi fi # Check formula exists