WinRb / WinRM

Ruby library for Windows Remote Management
Apache License 2.0
412 stars 117 forks source link

ErrorRecord.invocation_info crash if <Nil N="InvocationInfo" /> #309

Closed cork closed 4 years ago

cork commented 4 years ago

If the response InvocationInfo object is empty the ErrorRecord.invocation_info crashes with

NoMethodError: undefined method `elements' for nil:NilClass
from /winrm/.bundle/ruby/2.6.0/gems/winrm-2.3.3/lib/winrm/psrp/message_data/error_record.rb:51:in `property_hash'

The xml tag in the exception response is:

<Nil N="InvocationInfo" />
cork commented 4 years ago

Updated the error_record.rb:53 line number as it was offset by debug prints.

mwrock commented 4 years ago

closed by #310