diff options
author | Jörg Herzinger <joerg.herzinger@bytesource.net> | 2020-03-02 14:50:35 +0100 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-03-16 12:51:09 -0700 |
commit | 6492dd6c4f04119c421bdb403ecfecd6b2ac22ae (patch) | |
tree | ada76d132a54a601ae7a1c6cf4aa5d61793c3a06 | |
parent | 53047ee56541844fe8236fc6378563dc74e5866b (diff) | |
download | chef-6492dd6c4f04119c421bdb403ecfecd6b2ac22ae.tar.gz |
Fix gsub so only file endings of .rb and .json are removed. Any file paths, like FQDNs with them in between will not be handeled.
Signed-off-by: Jörg Herzinger <joerg.herzinger@gmail.com>
-rw-r--r-- | lib/chef/chef_fs/chef_fs_data_store.rb | 2 |
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 |