diff options
Diffstat (limited to 'lib/chef/role.rb')
-rw-r--r-- | lib/chef/role.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/role.rb b/lib/chef/role.rb index 2e42788f06..c085d1d714 100644 --- a/lib/chef/role.rb +++ b/lib/chef/role.rb @@ -249,8 +249,8 @@ class Chef paths = Array(Chef::Config[:role_path]) paths.each do |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$/ } + 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 raise Chef::Exceptions::DuplicateRole, "Multiple roles of same type found named #{name}" end |