diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 11:42:46 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:29 -0700 |
commit | 46a0a539ab1800942a3d3d6f2a73ca251f5d4a16 (patch) | |
tree | cccb304a65a2cde4789fb413913a2a688eeac28f | |
parent | 09976bed9e8fd8434c4272f5ca2d3376eb3cd28a (diff) | |
download | chef-46a0a539ab1800942a3d3d6f2a73ca251f5d4a16.tar.gz |
Escape path for globbing.
-rw-r--r-- | lib/chef/cookbook/syntax_check.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/cookbook/syntax_check.rb b/lib/chef/cookbook/syntax_check.rb index 092fb47eba..3b35f77de9 100644 --- a/lib/chef/cookbook/syntax_check.rb +++ b/lib/chef/cookbook/syntax_check.rb @@ -21,6 +21,7 @@ require 'stringio' require 'erubis' require 'chef/mixin/shell_out' require 'chef/mixin/checksum' +require 'chef/util/path_helper' class Chef class Cookbook @@ -110,7 +111,7 @@ class Chef end def ruby_files - remove_ignored_files Dir[File.join(cookbook_path, '**', '*.rb')] + remove_ignored_files Dir[File.join(Chef::Util::PathHelper.escape_glob(cookbook_path), '**', '*.rb')] end def untested_ruby_files @@ -125,7 +126,7 @@ class Chef end def template_files - remove_ignored_files Dir[File.join(cookbook_path, '**/templates/**', '*.erb')] + remove_ignored_files Dir[File.join(Chef::Util::PathHelper.escape_glob(cookbook_path), '**/templates/**', '*.erb')] end def untested_template_files |