diff options
author | Daniel O'Connor <daniel.oconnor@gmail.com> | 2014-08-03 17:33:12 +0930 |
---|---|---|
committer | Daniel O'Connor <daniel.oconnor@gmail.com> | 2014-08-03 17:33:12 +0930 |
commit | 0e5952187e11d0f0264d2841fa0246c7f5f28c81 (patch) | |
tree | 7fa29da5167c93c410f6846fcfcec4ef965ab6d7 /lib/chef/role.rb | |
parent | b01813613a8244efec0ba0907b9e7dae3461d26c (diff) | |
download | chef-0e5952187e11d0f0264d2841fa0246c7f5f28c81.tar.gz |
Fixes #1739 - regression from a93af4060369f23299652b92fdc451468a3e5534 which matches files too widely. Signed CLA.
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 64952c6ab2..57f3a2aa29 100644 --- a/lib/chef/role.rb +++ b/lib/chef/role.rb @@ -236,8 +236,8 @@ class Chef paths = Array(Chef::Config[:role_path]) paths.each do |path| roles_files = Dir.glob(File.join(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 |