summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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..3ca215bf6f 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..42ebe4e63f 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