Sha256: c912f21471fb58aa6fef7fd300a674483eabc6400b3dce9af29ca19603e5cc8b
Contents?: true
Size: 449 Bytes
Versions: 2
Compression:
Stored size: 449 Bytes
Contents
module Koine module DbBkp class Cli CommandFailed = Class.new(StandardError) def execute(command) exit_code = system_command(command).to_i unless exit_code == 0 raise CommandFailed, "Command '#{commadn}' exited with code #{exit_code}" end end def system_command(command) puts command system(command.to_s) $CHILD_STATUS.exitstatus end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
koine-db_bkp-0.1.1 | lib/koine/db_bkp/cli.rb |
koine-db_bkp-0.1.0 | lib/koine/db_bkp/cli.rb |