bin/support/ruby/lib/utils/commandline.rb
# TODO: - think about how to bring the run and execute methods together or give more differentiating names
- think about how to bring the run and execute methods together or give more differentiating names
- think about how to bring the run and execute methods together or give more differentiating names
def execute(*commands, fail_message:, pass_message:)
    fail = false
    commands.each do |command|
      result = run command
      say result.stdout
      next unless result.error?
      fail = true
      say result.stderr
      say error fail_message
    end
    say ok pass_message unless fail
  end
def execute ( * commands , fail_message : , pass_message : ) fail = false commands . each do | command | result = run command say result . stdout next unless result . error? fail = true say result . stderr say error fail_message end say ok pass_message unless fail end
TODO: - think about how to bring the run and execute methods together or give more differentiating names
TODO : - think about how to bring the run and execute methods together or give more differentiating names
commands
fail_message
pass_message