summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-05-18 16:26:00 -0700
committerGitHub <noreply@github.com>2020-05-18 16:26:00 -0700
commitb2b94c2d03c8ff39b957a42093d5f5ce768d6474 (patch)
treecdb3e5908de320540ea5d2c2ac74477776bc86a6
parent4c681ce0e23cd3edb866cef419fa8e0e62aa7978 (diff)
parentffd825615b7c4b24bbd40cc0ab1f959fdbc8add0 (diff)
downloadchef-b2b94c2d03c8ff39b957a42093d5f5ce768d6474.tar.gz
Merge pull request #9883 from chef/fix-keyword-warning
Fix ruby 2.7 keyword argument warning.
-rw-r--r--lib/chef/resource/hostname.rb2
-rw-r--r--spec/support/shared/functional/windows_script.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/hostname.rb b/lib/chef/resource/hostname.rb
index 9d4dd03aa7..41dc80d1bf 100644
--- a/lib/chef/resource/hostname.rb
+++ b/lib/chef/resource/hostname.rb
@@ -149,7 +149,7 @@ class Chef
# this must come before other methods like /etc/hostname and /etc/sysconfig/network
declare_resource(:execute, "hostnamectl set-hostname #{new_resource.hostname}") do
notifies :reload, "ohai[reload hostname]"
- not_if { shell_out!("hostnamectl status", { returns: [0, 1] }).stdout =~ /Static hostname:\s*#{new_resource.hostname}\s*$/ }
+ not_if { shell_out!("hostnamectl status", returns: [0, 1]).stdout =~ /Static hostname:\s*#{new_resource.hostname}\s*$/ }
end
when ::File.exist?("/etc/hostname")
# debian family uses /etc/hostname
diff --git a/spec/support/shared/functional/windows_script.rb b/spec/support/shared/functional/windows_script.rb
index fa3416eed4..7747524d03 100644
--- a/spec/support/shared/functional/windows_script.rb
+++ b/spec/support/shared/functional/windows_script.rb
@@ -146,7 +146,7 @@ shared_context Chef::Resource::WindowsScript do
shared_examples_for "a script whose file system location cannot be accessed by other non-admin users" do
let(:ruby_access_command) { file_access_command }
it "generates a script in the local file system that prevents read access to other non-admin users" do
- shell_out!(access_command, { user: windows_nonadmin_user, password: windows_nonadmin_user_password, returns: [access_denied_sentinel] })
+ shell_out!(access_command, user: windows_nonadmin_user, password: windows_nonadmin_user_password, returns: [access_denied_sentinel])
end
end