applyEngineAndAgentEnv merges custom environment variables from engine and agent configs.
(env map[string]string, workflowData *WorkflowData, log *logger.Logger)
| 137 | |
| 138 | // applyEngineAndAgentEnv merges custom environment variables from engine and agent configs. |
| 139 | func applyEngineAndAgentEnv(env map[string]string, workflowData *WorkflowData, log *logger.Logger) { |
| 140 | if workflowData == nil { |
| 141 | return |
| 142 | } |
| 143 | if workflowData.EngineConfig != nil && len(workflowData.EngineConfig.Env) > 0 { |
| 144 | maps.Copy(env, workflowData.EngineConfig.Env) |
| 145 | } |
| 146 | agentConfig := getAgentConfig(workflowData) |
| 147 | if agentConfig != nil && len(agentConfig.Env) > 0 { |
| 148 | maps.Copy(env, agentConfig.Env) |
| 149 | if log != nil { |
| 150 | log.Printf("Added %d custom env vars from agent config", len(agentConfig.Env)) |
| 151 | } |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | // applyMCPScriptsSecretEnv appends mcp-scripts secrets unless already present. |
| 156 | func applyMCPScriptsSecretEnv(env map[string]string, workflowData *WorkflowData) { |
no test coverage detected