# File lib/backup/cli/helpers.rb, line 22 def run(command, options = {}) command.gsub!(/^\s+/, "") process_data = Hash.new pid, stdin, stdout, stderr = Open4::popen4(command) ignored, process_data[:status] = Process::waitpid2(pid) process_data[:stdout] = stdout.read process_data[:stderr] = stderr.read process_data[:ignore_exit_codes] = ((options[:ignore_exit_codes] || Array.new) << 0).uniq raise_if_command_failed!(command_name(command), process_data) process_data[:stdout] end