Ruby-Graphviz
Ruby-Graphviz copied to clipboard
dot execution status incorrectly processed
There's a problem in output_from_command
(lib/graphviz/utils.rb) in the condition:
if (status.nil? && (errors.nil? || errors.strip.empty?)) || status.zero?
The method zero?
crashes when status is nil, a situation which escapes the first half of the condition.
One correct way to write it would be:
if (status.nil? && (errors.nil? || errors.strip.empty?)) || 0 == status
I know I should do this as a pull request, but for just a few characters it doesn't seem worth it. Maybe someone in the team can do it?
Thanks!