summaryrefslogtreecommitdiff
path: root/lib/chef/knife/cookbook_site_install.rb
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-12-03 10:49:28 -0800
committerBryan McLellan <btm@opscode.com>2012-12-03 10:57:02 -0800
commit7bfa10f55696305eac5bdf726f2cf284789ceb4c (patch)
tree449856244d89dc0186f16817c75870f21eac2e21 /lib/chef/knife/cookbook_site_install.rb
parentb65752831de417d0a629dd0dc6b080882045f0e1 (diff)
downloadchef-7bfa10f55696305eac5bdf726f2cf284789ceb4c.tar.gz
CHEF-3555: fix knife cookbook site install when String
Ensure we turn cookbook_path into an Array before calling #first on it, as this does not work in Ruby 1.9+ H/T Aaron Kalin for the fix
Diffstat (limited to 'lib/chef/knife/cookbook_site_install.rb')
-rw-r--r--lib/chef/knife/cookbook_site_install.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/cookbook_site_install.rb b/lib/chef/knife/cookbook_site_install.rb
index 584735d8ff..d7a3bfd62c 100644
--- a/lib/chef/knife/cookbook_site_install.rb
+++ b/lib/chef/knife/cookbook_site_install.rb
@@ -74,7 +74,7 @@ class Chef
@cookbook_name = parse_name_args!
# Check to ensure we have a valid source of cookbooks before continuing
#
- @install_path = File.expand_path(config[:cookbook_path].first)
+ @install_path = File.expand_path(Array(config[:cookbook_path]).first)
ui.info "Installing #@cookbook_name to #{@install_path}"
@repo = CookbookSCMRepo.new(@install_path, ui, config)