Class: Roast::Workflow::StepExecutors::StringStepExecutor
- Inherits:
-
BaseStepExecutor
- Object
- BaseStepExecutor
- Roast::Workflow::StepExecutors::StringStepExecutor
- Defined in:
- lib/roast/workflow/step_executors/string_step_executor.rb
Instance Method Summary collapse
Methods inherited from BaseStepExecutor
Constructor Details
This class inherits a constructor from Roast::Workflow::StepExecutors::BaseStepExecutor
Instance Method Details
#execute(step) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/roast/workflow/step_executors/string_step_executor.rb', line 7 def execute(step) # Interpolate any {{}} expressions before executing the step interpolated_step = workflow_executor.interpolate(step) # For command steps, check if there's an exit_on_error configuration # We need to extract the step name to look up configuration if interpolated_step.starts_with?("$(") # This is a direct command without a name, so exit_on_error defaults to true workflow_executor.execute_step(interpolated_step) else # Check if this step has exit_on_error configuration step_config = config_hash[step] exit_on_error = step_config.is_a?(Hash) ? step_config.fetch("exit_on_error", true) : true workflow_executor.execute_step(interpolated_step, exit_on_error: exit_on_error) end end |