# File lib/dragonfly/shell.rb, line 12 def run(command, args="") full_command = "#{command} #{escape_args(args)}" log.debug("Running command: #{full_command}") if log_commands begin result = `#{full_command}` rescue Errno::ENOENT raise_shell_command_failed(full_command) end if $?.exitstatus == 1 throw :unable_to_handle elsif !$?.success? raise_shell_command_failed(full_command) end result end