diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 12:19:03 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:30 -0700 |
commit | ee7f79f699beaf136d93970734a0ec552aabc11b (patch) | |
tree | 347f309b04da4629643c7d899bd2b0117c70d7bd /lib/chef/role.rb | |
parent | 69e9a4f8bf4e80c637badaf8df9de8054cc4ac1e (diff) | |
download | chef-ee7f79f699beaf136d93970734a0ec552aabc11b.tar.gz |
Escape path for globbing.
Diffstat (limited to 'lib/chef/role.rb')
-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..4b4669f4b5 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 = Dir.glob(File.join(Chef::Util::PathHelper.escape_glob(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 |