diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 11:55:23 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:29 -0700 |
commit | 1393427cf7e3a871eea314c6e683299e2c48e648 (patch) | |
tree | 8e9c4500e9e8ebcbf74355dbe98f3ed853eb302c /lib/chef/knife | |
parent | da3966873a32b5e966d1caf404bb87d56cd1d807 (diff) | |
download | chef-1393427cf7e3a871eea314c6e683299e2c48e648.tar.gz |
Escape path for globbing.
Diffstat (limited to 'lib/chef/knife')
-rw-r--r-- | lib/chef/knife/core/bootstrap_context.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/knife/core/bootstrap_context.rb b/lib/chef/knife/core/bootstrap_context.rb index 87c25ca160..2b3d2c53a8 100644 --- a/lib/chef/knife/core/bootstrap_context.rb +++ b/lib/chef/knife/core/bootstrap_context.rb @@ -167,7 +167,7 @@ CONFIG def trusted_certs_content content = "" if @chef_config[:trusted_certs_dir] - Dir.glob(File.join(@chef_config[:trusted_certs_dir], "*.{crt,pem}")).each do |cert| + Dir.glob(File.join(Chef::Util::PathHelper.escape_glob(@chef_config[:trusted_certs_dir]), "*.{crt,pem}")).each do |cert| content << "cat > /etc/chef/trusted_certs/#{File.basename(cert)} <<'EOP'\n" + IO.read(File.expand_path(cert)) + "\nEOP\n" end |