class Koine::DbBkp::Cli
Constants
- CommandFailed
Public Instance Methods
execute(command)
click to toggle source
# File lib/koine/db_bkp/cli.rb, line 6 def execute(command) exit_code = system_command(command).to_i unless exit_code == 0 raise CommandFailed, "Command '#{command}' exited with code #{exit_code}" end end
system_command(command)
click to toggle source
# File lib/koine/db_bkp/cli.rb, line 14 def system_command(command) puts command system(command.to_s) $CHILD_STATUS.exitstatus end