diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-10 12:56:39 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-02-10 12:56:39 -0800 |
commit | 9e480a6944f3671d280ee0cf3c164dcde7c6a027 (patch) | |
tree | 8bca8b77c6a817763821a2325829f5bbe518f2a4 /lib/chef/application | |
parent | f3b397fe53450171b3e284d25533cceab9ef99ac (diff) | |
download | chef-9e480a6944f3671d280ee0cf3c164dcde7c6a027.tar.gz |
use Pathname correctly
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/solo.rb | 3 |
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] |