diff options
author | Vlad Gorodetsky <v@gor.io> | 2016-09-07 18:27:33 +0300 |
---|---|---|
committer | Vlad Gorodetsky <v@gor.io> | 2016-09-19 10:09:18 +0300 |
commit | c7a9d89d4cbc7a2b794bc25d13100915149dc02f (patch) | |
tree | dba0b39e8305254e4ace2fd1dc35abd7bf326b03 | |
parent | ed21f8cff3d816394fb50258e1ea27ac2fc89a5a (diff) | |
download | chef-c7a9d89d4cbc7a2b794bc25d13100915149dc02f.tar.gz |
Normalize full key name to avoid resource update on identical key names
-rw-r--r-- | lib/chef/provider/apt_repository.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/apt_repository.rb b/lib/chef/provider/apt_repository.rb index 9e077c8cbb..9e91b12373 100644 --- a/lib/chef/provider/apt_repository.rb +++ b/lib/chef/provider/apt_repository.rb @@ -153,7 +153,7 @@ class Chef end def install_key_from_uri - key_name = new_resource.key.split(%r{\/}).last + key_name = new_resource.key.gsub(/[^0-9A-Za-z\-]/, "_") cached_keyfile = ::File.join(Chef::Config[:file_cache_path], key_name) type = if new_resource.key.start_with?("http") :remote_file |