summaryrefslogtreecommitdiff
path: root/lib/chef/application
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-10 12:56:39 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-10 12:56:39 -0800
commit9e480a6944f3671d280ee0cf3c164dcde7c6a027 (patch)
tree8bca8b77c6a817763821a2325829f5bbe518f2a4 /lib/chef/application
parentf3b397fe53450171b3e284d25533cceab9ef99ac (diff)
downloadchef-9e480a6944f3671d280ee0cf3c164dcde7c6a027.tar.gz
use Pathname correctly
Diffstat (limited to 'lib/chef/application')
-rw-r--r--lib/chef/application/solo.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 058910089f..e73149f1ef 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -26,6 +26,7 @@ require "chef/rest"
require "chef/config_fetcher"
require "fileutils"
require "chef/mixin/shell_out"
+require "pathname"
class Chef::Application::Solo < Chef::Application
include Chef::Mixin::ShellOut
@@ -219,7 +220,7 @@ class Chef::Application::Solo < Chef::Application
Chef::Log.deprecation("-r MUST be changed to --recipe-url, the -r option will be changed in Chef 13.0") if ARGV.include?("-r")
if Chef::Config[:recipe_url]
- cookbooks_path = Array(Chef::Config[:cookbook_path]).detect{|e| Pathname.cleanpath(e) =~ /\/cookbooks\/*$/ }
+ cookbooks_path = Array(Chef::Config[:cookbook_path]).detect{|e| Pathname.new(e).cleanpath.to_s =~ /\/cookbooks\/*$/ }
recipes_path = File.expand_path(File.join(cookbooks_path, ".."))
if Chef::Config[:delete_entire_chef_repo]