summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-04-28 16:28:52 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-04-28 16:28:52 -0700
commit450ee3767c58c297e884e24cf5796a6a16818d6e (patch)
treefd34fdd59289cc5944f53da83d4cfefc8b3ee586 /lib/chef
parent52328f2e7d6d73690c023843f887604dbcba1d14 (diff)
downloadchef-450ee3767c58c297e884e24cf5796a6a16818d6e.tar.gz
Fix more ruby 2.7 warning logspamlcg/more-ruby-27-logging-suppression
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/provider/execute.rb2
-rw-r--r--lib/chef/provider/package/freebsd/base.rb3
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/provider/execute.rb b/lib/chef/provider/execute.rb
index e4fc1ee9ea..4ae1e794fc 100644
--- a/lib/chef/provider/execute.rb
+++ b/lib/chef/provider/execute.rb
@@ -49,7 +49,7 @@ class Chef
converge_by("execute #{description}") do
begin
- shell_out!(command, opts)
+ shell_out!(command, **opts)
rescue Mixlib::ShellOut::ShellCommandFailed
if sensitive?
ex = Mixlib::ShellOut::ShellCommandFailed.new("Command execution failed. STDOUT/STDERR suppressed for sensitive resource")
diff --git a/lib/chef/provider/package/freebsd/base.rb b/lib/chef/provider/package/freebsd/base.rb
index 70ca3f4a98..2805200516 100644
--- a/lib/chef/provider/package/freebsd/base.rb
+++ b/lib/chef/provider/package/freebsd/base.rb
@@ -58,7 +58,8 @@ class Chef
def makefile_variable_value(variable, dir = nil)
options = dir ? { cwd: dir } : {}
- make_v = shell_out!("make", "-V", variable, options.merge!(env: nil, returns: [0, 1]))
+ options.merge!(env: nil, returns: [0, 1])
+ make_v = shell_out!("make", "-V", variable, **options)
make_v.exitstatus == 0 ? make_v.stdout.strip.split($OUTPUT_RECORD_SEPARATOR).first : nil # $\ is the line separator, i.e. newline.
end
end