diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-18 16:39:30 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-18 16:39:30 -0700 |
commit | 0cc7ca67c0280c6352f837cfa5dba06a8030b1b2 (patch) | |
tree | b98ee1222159857413115c0929fa0f8b5645a80c | |
parent | 280b9e157315a72ef355292b406ca7e8143b8075 (diff) | |
download | chef-0cc7ca67c0280c6352f837cfa5dba06a8030b1b2.tar.gz |
Use PathHelper's glob.
-rw-r--r-- | lib/chef/role.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb index aeea873051..fd959fb2a1 100644 --- a/lib/chef/role.rb +++ b/lib/chef/role.rb @@ -235,7 +235,7 @@ class Chef def self.from_disk(name) paths = Array(Chef::Config[:role_path]) paths.each do |path| - roles_files = Dir.glob(File.join(path, "**", "**")) + roles_files = Chef::Util::PathHelper.glob(File.join(path, "**", "**")) js_files = roles_files.select { |file| file.match /\/#{name}\.json$/ } rb_files = roles_files.select { |file| file.match /\/#{name}\.rb$/ } if js_files.count > 1 or rb_files.count > 1 |