Browse files

Make ironfan work with string (in addition to array) for cluster_path…

…, to conform to chef semantics (fixes #130)
  • Loading branch information...
1 parent 059ebd2 commit b7feef6a6f138981b22d234197b1a8527111d3b0 @temujin9 temujin9 committed Apr 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/ironfan.rb
@@ -29,7 +29,7 @@ module Ironfan
# path to search for cluster definition files
def self.cluster_path
- return Chef::Config[:cluster_path] if Chef::Config[:cluster_path]
+ return Array(Chef::Config[:cluster_path]) if Chef::Config[:cluster_path]
raise "Holy smokes, you have no cookbook_path or cluster_path set up. Follow chef's directions for creating a knife.rb." if Chef::Config[:cookbook_path].blank?
cl_path = Chef::Config[:cookbook_path].map{|dir| File.expand_path('../clusters', dir) }.uniq
ui.warn "No cluster path set. Taking a wild guess that #{cl_path.inspect} is \nreasonable based on your cookbook_path -- but please set cluster_path in your knife.rb"

0 comments on commit b7feef6

Please sign in to comment.