diff options
author | Bryan McLellan <btm@chef.io> | 2020-05-12 19:09:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 19:09:32 -0400 |
commit | 1cb646f48e5733889a1735782b2464685e61ba15 (patch) | |
tree | d88b77062919d627cbfe8a6d0391c3ea9b7aebc9 /lib | |
parent | 1543615079dfc7bea7773c7b55f025283fbd5b42 (diff) | |
parent | 227e07e7b5973b03b0583a989bec525aa6430a8b (diff) | |
download | chef-1cb646f48e5733889a1735782b2464685e61ba15.tar.gz |
Merge pull request #9850 from chef/deprecation_warnings
Avoid ruby deprecation warnings in cab_package and powershell_script
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/package/cab.rb | 2 | ||||
-rw-r--r-- | lib/chef/provider/powershell_script.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/cab.rb b/lib/chef/provider/package/cab.rb index 3ede6dbe10..4aaa034fa4 100644 --- a/lib/chef/provider/package/cab.rb +++ b/lib/chef/provider/package/cab.rb @@ -74,7 +74,7 @@ class Chef def dism_command(command) with_os_architecture(nil) do - result = shell_out("dism.exe /Online /English #{command} /NoRestart", { timeout: new_resource.timeout }) + result = shell_out("dism.exe /Online /English #{command} /NoRestart", timeout: new_resource.timeout) if result.exitstatus == -2146498530 raise Chef::Exceptions::Package, "The specified package is not applicable to this image." if result.stdout.include?("0x800f081e") diff --git a/lib/chef/provider/powershell_script.rb b/lib/chef/provider/powershell_script.rb index 6900ba18b6..5210b65d48 100644 --- a/lib/chef/provider/powershell_script.rb +++ b/lib/chef/provider/powershell_script.rb @@ -94,7 +94,7 @@ class Chef # means a non-zero return and thus a syntactically invalid script. with_os_architecture(node, architecture: new_resource.architecture) do - shell_out!(validation_command, { returns: [0] }) + shell_out!(validation_command, returns: [0]) end end end |