summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-03-16 13:11:57 -0700
committerGitHub <noreply@github.com>2020-03-16 13:11:57 -0700
commita82ab66904a60fdceb0833999f49100d2cde7dc2 (patch)
treed5f6560cf3a79bcaa687d3326763633029fe3c02
parent82faf0c44b4598aefda899c1033cfccac3691193 (diff)
parent6492dd6c4f04119c421bdb403ecfecd6b2ac22ae (diff)
downloadchef-a82ab66904a60fdceb0833999f49100d2cde7dc2.tar.gz
Merge pull request #9498 from chef/chef_fs
chef_fs: Fix gsub so only file endings of .rb and .json are removed.
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index 807d5e0155..a8f130f308 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -775,7 +775,7 @@ class Chef
end
elsif path.length == 2 && path[0] != "cookbooks"
- path[1] = path[1].gsub(/\.(rb|json)/, "")
+ path[1] = path[1].gsub(/\.(rb|json)$/, "")
end
path