lib/riddle/execute_command.rb in riddle-2.2.2 vs lib/riddle/execute_command.rb in riddle-2.3.0
- old
+ new
@@ -28,10 +28,14 @@
private
attr_reader :command, :verbose
def result_from_backticks
- output = `#{command}`
+ begin
+ output = `#{command}`
+ rescue SystemCallError => error
+ output = error.message
+ end
Riddle::CommandResult.new command, $?.exitstatus, output
end
def result_from_system