lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.18 vs lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.19
- old
+ new
@@ -26,10 +26,13 @@
wf_load.for(:input) do |wf_input|
wf_input.on(:get) do |wf_input_get, io|
cases_with_input = config.usecases.active(io: io).select do |usecase, data|
io.class.input_required?(usecase.type)
end
- next io unless (!io.input || io.input.empty?) && !cases_with_input.empty?
+
+ input_is_required = !cases_with_input.empty? || io.options.dig(:input, :entries_from)
+ missing_input = !io.input || io.input.empty?
+ next io unless missing_input && input_is_required
if io.options.dig(:input, :entries_from)
io = io.new(input: config.input.get(io: io))
else
opt_case = cases_with_input.values.first.option