summaryrefslogtreecommitdiff
path: root/lib/mixlib/shellout/unix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mixlib/shellout/unix.rb')
-rw-r--r--lib/mixlib/shellout/unix.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mixlib/shellout/unix.rb b/lib/mixlib/shellout/unix.rb
index b8f42e0..5900302 100644
--- a/lib/mixlib/shellout/unix.rb
+++ b/lib/mixlib/shellout/unix.rb
@@ -370,11 +370,11 @@ module Mixlib
return if attempt_reap
@terminate_reason = "Command exceeded allowed execution time, process terminated"
- logger.error("Command exceeded allowed execution time, sending TERM") if logger
+ logger&.error("Command exceeded allowed execution time, sending TERM")
Process.kill(:TERM, child_pgid)
sleep 3
attempt_reap
- logger.error("Command exceeded allowed execution time, sending KILL") if logger
+ logger&.error("Command exceeded allowed execution time, sending KILL")
Process.kill(:KILL, child_pgid)
reap