diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-06-11 15:34:14 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-06-11 15:34:14 -0700 |
commit | 7633417e686f83728b5ae6e9c66df19f38d34492 (patch) | |
tree | aaf0bca28345f108acdbac5f1dc3f58c8a0d0574 | |
parent | 5825eea4b139b9af089c3075d042d5d3160583ec (diff) | |
download | chef-match.tar.gz |
Avoid a nil checkmatch
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/application/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/application/base.rb b/lib/chef/application/base.rb index d9dff86795..1749284ea2 100644 --- a/lib/chef/application/base.rb +++ b/lib/chef/application/base.rb @@ -363,7 +363,7 @@ class Chef::Application::Base < Chef::Application Chef::Log.trace("Download recipes tarball from #{url} to #{path}") if File.exist?(url) FileUtils.cp(url, path) - elsif url&.match?(URI.regexp) + elsif URI.regexp.match?(url) File.open(path, "wb") do |f| open(url) do |r| f.write(r.read) |