fix: fix: hire-an-agent formula lookup fails for agents with run- prefix formulas (#213)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

This commit is contained in:
Agent 2026-04-05 14:34:27 +00:00
parent 55e4132560
commit d06cd47838

View file

@ -2602,9 +2602,12 @@ disinto_hire_an_agent() {
esac esac
done done
# Default formula path # Default formula path — try both naming conventions
if [ -z "$formula_path" ]; then if [ -z "$formula_path" ]; then
formula_path="${FACTORY_ROOT}/formulas/${role}.toml" formula_path="${FACTORY_ROOT}/formulas/${role}.toml"
if [ ! -f "$formula_path" ]; then
formula_path="${FACTORY_ROOT}/formulas/run-${role}.toml"
fi
fi fi
# Validate formula exists # Validate formula exists