Skip to content

Commit

Permalink
It was failing if the answer was nil, TrueClass or FalseClass. Refs #…
Browse files Browse the repository at this point in the history
…12122
  • Loading branch information
carlasouza committed Mar 26, 2012
1 parent 9c78ef9 commit aefeb0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hiera/backend.rb
Expand Up @@ -160,8 +160,8 @@ def lookup(key, default, scope, order_override, resolution_type)
new_answer = @backends[backend].lookup(key, scope, order_override, resolution_type)
case resolution_type
when :priority
answer = new_answer
break if !answer.empty?
answer = new_answer unless !new_answer.nil?

This comment has been minimized.

Copy link
@lfrancke

lfrancke Mar 26, 2012

Thanks for this fix but unfortunately it still fails (can't find any variables right now). I think it should be

answer = new_answer unless new_answer.nil?

This comment has been minimized.

Copy link
@carlasouza

carlasouza Mar 26, 2012

Author Owner

Exactly. That was a silly mistake. Fixed at this commit

break if answer != empty_answer(:priority)
when :array
answer << new_answer
when :hash
Expand Down

0 comments on commit aefeb0f

Please sign in to comment.