diff options
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/solo.rb | 2 | ||||
-rw-r--r-- | lib/chef/application/windows_service.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb index 0da696c05c..29ba1971e1 100644 --- a/lib/chef/application/solo.rb +++ b/lib/chef/application/solo.rb @@ -272,7 +272,7 @@ class Chef::Application::Solo < Chef::Application Chef::Application.fatal!(unforked_interval_error_message) if !Chef::Config[:client_fork] && Chef::Config[:interval] if Chef::Config[:recipe_url] - cookbooks_path = Array(Chef::Config[:cookbook_path]).detect { |e| Pathname.new(e).cleanpath.to_s =~ /\/cookbooks\/*$/ } + cookbooks_path = Array(Chef::Config[:cookbook_path]).detect { |e| Pathname.new(e).cleanpath.to_s =~ %r{/cookbooks/*$} } recipes_path = File.expand_path(File.join(cookbooks_path, "..")) if Chef::Config[:delete_entire_chef_repo] diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index e0df23371c..8a942103f1 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -307,7 +307,7 @@ class Chef begin case config[:config_file] - when /^(http|https):\/\// + when %r{^(http|https)://} Chef::HTTP.new("").streaming_request(config[:config_file]) { |f| apply_config(f.path) } else ::File.open(config[:config_file]) { |f| apply_config(f.path) } |