lib/hub/runner.rb
def execute_command_chain
      commands = args.commands
      commands.each_with_index do |cmd, i|
        if cmd.respond_to?(:call) then cmd.call
        elsif i == commands.length - 1
          # last command in chain
          exec(*cmd)
        else
          exit($?.exitstatus) unless system(*cmd)
        end
      end
    end
# Runs multiple commands in succession; exits at first failure.
Runs multiple commands in succession; exits at first failure.
Runs multiple commands in succession ; exits at first failure .
def execute_command_chain
      commands = args.commands
      commands.each_with_index do |cmd, i|
        if cmd.respond_to?(:call) then cmd.call
        elsif i == commands.length - 1
          exec(*cmd)
        else
          exit($?.exitstatus) unless system(*cmd)
        end
      end
    end
def execute_command_chain commands = args . commands commands . each_with_index do | cmd , i | if cmd . respond_to? ( :call ) then cmd . call elsif i == commands . length - 1 exec ( * cmd ) else exit ( $? . exitstatus ) unless system ( * cmd ) end end end
Runs multiple commands in succession; exits at first failure.
Runs multiple commands in succession ; exits at first failure .
# last command in chain