summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire McQuin <claire@getchef.com>2014-09-18 16:39:30 -0700
committerClaire McQuin <claire@getchef.com>2014-09-18 16:39:30 -0700
commit0cc7ca67c0280c6352f837cfa5dba06a8030b1b2 (patch)
treeb98ee1222159857413115c0929fa0f8b5645a80c
parent280b9e157315a72ef355292b406ca7e8143b8075 (diff)
downloadchef-0cc7ca67c0280c6352f837cfa5dba06a8030b1b2.tar.gz
Use PathHelper's glob.
-rw-r--r--lib/chef/role.rb2
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