diff options
author | Tim Smith <tsmith@chef.io> | 2020-11-08 17:39:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-08 17:39:05 -0800 |
commit | 6bf9c2de6c63cfa9b03e61ad5ba02ddb0d8a9b05 (patch) | |
tree | b114a6ff017c376e544a4f9c1351efd58994e4f5 /lib/chef/cookbook_version.rb | |
parent | d6ffd5b44a04ff32e9049ed8c04bf4dad38e5b7e (diff) | |
download | chef-6bf9c2de6c63cfa9b03e61ad5ba02ddb0d8a9b05.tar.gz |
Use ||= where we can (#10609)
* Use ||= where we can
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/cookbook_version.rb')
-rw-r--r-- | lib/chef/cookbook_version.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index 135a5292a6..420532585a 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -587,10 +587,7 @@ class Chef end def file_vendor - unless @file_vendor - @file_vendor = Chef::Cookbook::FileVendor.create_from_manifest(cookbook_manifest) - end - @file_vendor + @file_vendor ||= Chef::Cookbook::FileVendor.create_from_manifest(cookbook_manifest) end end |