Module: MysqlS3Backup::Shell

Included in:
Mysql
Defined in:
lib/mysql_s3_backup/shell.rb

Instance Method Summary collapse

Instance Method Details

#run(command) ⇒ Object

Raises:



5
6
7
8
9
10
11
# File 'lib/mysql_s3_backup/shell.rb', line 5

def run(command)
  puts command if $VERBOSE
  result = `#{command}`.chomp
  puts result if $VERBOSE
  raise ShellCommandError, "error, process exited with status #{$?.exitstatus}: #{result}" unless $?.success?
  result
end