diff options
author | Jörg Herzinger <joerg.herzinger@bytesource.net> | 2020-03-02 14:50:35 +0100 |
---|---|---|
committer | Jörg Herzinger <joerg.herzinger@bytesource.net> | 2020-03-02 14:50:35 +0100 |
commit | 7d10b4987e087e38008b631517c54e7550509108 (patch) | |
tree | 2b612b94537853cb7549cfaed0cacdba077648c5 | |
parent | 5f29b31fb9ed3eafcb249fb9e7056cf95497ae43 (diff) | |
download | chef-7d10b4987e087e38008b631517c54e7550509108.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 |