Fix a regression where cookbooks path must be an array

This commit is contained in:
Mitchell Hashimoto 2013-03-05 10:19:36 -08:00
parent 360051e032
commit dc5196454e
1 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,10 @@ module VagrantPlugins
@cookbooks_path = [[:host, "cookbooks"], [:vm, "cookbooks"]] @cookbooks_path = [[:host, "cookbooks"], [:vm, "cookbooks"]]
end end
# Make sure the path is an array.
@cookbooks_path = [@cookbooks_path] if \
!@cookbooks_path.is_a?(Array) || @cookbooks_path.first.is_a?(Symbol)
# Make sure all the paths are the proper format # Make sure all the paths are the proper format
@cookbooks_path.map! do |path| @cookbooks_path.map! do |path|
path = [:host, path] if !path.is_a?(Array) path = [:host, path] if !path.is_a?(Array)