Permalink
Browse files

Fix Chef::Search when called from outside of Chef scope

  • Loading branch information...
1 parent 26df3ae commit b47867906f195fca3ad03f7fcb314662bb415f5a Julien Vehent committed Oct 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 libraries/core.rb
View
@@ -313,8 +313,8 @@ def expand_ips(node, target, options, name)
if Chef::Config[:solo]
Chef::Log.warn("Chef Solo does not support search.")
else
- results = search(:node, search_string
- ).map{|n| n['network']['lanip'] || BLACKHOLE_IP}
+ results = Chef::Search::Query.new.search(:node, search_string
+ ).first.map{|n| n['network']['lanip'] || BLACKHOLE_IP}
end
if (results.count < 1) \

0 comments on commit b478679

Please sign in to comment.