summaryrefslogtreecommitdiff
path: root/lib/chef/resource/chocolatey_feature.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-07-07 15:19:21 -0700
committerTim Smith <tsmith84@gmail.com>2020-07-07 15:19:21 -0700
commit1485a862053fb20ade1f93bb82c6918cd4078975 (patch)
tree21ae9d81524f56a4b52449424550259422b1b9a5 /lib/chef/resource/chocolatey_feature.rb
parent3e9e6d41a31bd1ac932f7f4100102466b4fdfe05 (diff)
downloadchef-1485a862053fb20ade1f93bb82c6918cd4078975.tar.gz
Avoid assigning variables before returning if we don't have to
These seemed pretty straight forward. There's a new Rubocop cop for these. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/chocolatey_feature.rb')
-rw-r--r--lib/chef/resource/chocolatey_feature.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/resource/chocolatey_feature.rb b/lib/chef/resource/chocolatey_feature.rb
index 3b24ebbc9c..66752fbd5d 100644
--- a/lib/chef/resource/chocolatey_feature.rb
+++ b/lib/chef/resource/chocolatey_feature.rb
@@ -89,8 +89,7 @@ class Chef
# @param [String] action the name of the action to perform
# @return [String] the choco feature command string
def choco_cmd(action)
- cmd = "#{ENV["ALLUSERSPROFILE"]}\\chocolatey\\bin\\choco feature #{action} --name #{new_resource.feature_name}"
- cmd
+ "#{ENV["ALLUSERSPROFILE"]}\\chocolatey\\bin\\choco feature #{action} --name #{new_resource.feature_name}"
end
end
end