lib/plugins/puppet-debugger/input_responders/vars.rb in puppet-debugger-0.17.0 vs lib/plugins/puppet-debugger/input_responders/vars.rb in puppet-debugger-0.18.0

- old
+ new

@@ -7,11 +7,11 @@ COMMAND_GROUP = :scope def run(args = []) filter = args unless filter.empty? - parameters = resource_parameters(debugger.scope.catalog.resources, filter) + parameters = resource_parameters(debugger.catalog.resources, filter) return parameters.ai(sort_keys: true, indent: -1) end # remove duplicate variables that are also in the facts hash variables = debugger.scope.to_hash.delete_if { |key, _value| debugger.node.facts.values.key?(key) } variables['facts'] = 'removed by the puppet-debugger' if variables.key?('facts') @@ -28,10 +28,10 @@ end def parameters_to_h(resource) resource.parameters.each_with_object({}) do | param, params | name = param.first.to_s - params[name] = param.last.value + params[name] = param.last.respond_to?(:value) ? param.last.value : param.last params end end def find_resources(resources, filter = [])