lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.38 vs lib/eco/cli/config/default/workflow.rb in eco-helpers-2.0.39

- old
+ new

@@ -99,22 +99,31 @@ wf_post.skip! else get_people = io.options.dig(:people, :get) partial_update = get_people && get_people.dig(:type) == :partial run_it = !io.options[:dry_run] || io.options.dig(:post_launch, :run) - if run_it && partial_update - unless io.options[:dry_run] + refresh_data = !io.options[:dry_run] && partial_update + if run_it + if refresh_data # get target people afresh people = io.session.micro.people_refresh(people: io.people, include_created: true) io = io.base.new(people: people) + else + msg = "Although there are post_launch cases, data will not be refreshed before their run" + if io.options[:dry_run] + msg += ", because we are in dry-run (simulate)." + elsif !partial_update + msg += ", because it is not a partial update (-get-partial option not present)." + end + io.session.logger.warn(msg) end else wf_post.skip! msg = "Although there are post_launch cases, they will NOT be RUN" - if io.options[:dry_run] - msg+= ", because we are in dry-run (simulate)." - elsif !partial_update + if !partial_update msg+= ", because it is not a partial update (-get-partial)" + elsif io.options[:dry_run] + msg+= ", because we are in dry-run (simulate)." end io.session.logger.info(msg) end end io