summaryrefslogtreecommitdiff
path: root/lib/oxidized/hook/exec.rb
diff options
context:
space:
mode:
authorKodApa85 <parsons151185@gmail.com>2018-04-27 13:48:47 +0100
committerGitHub <noreply@github.com>2018-04-27 13:48:47 +0100
commita40bb72e78755891ec84f5a4378c30114dae8316 (patch)
tree5e057527f163fa1bea10cbdc7318b035ff939200 /lib/oxidized/hook/exec.rb
parentdbbe6af563072b62e373a9824c6a23482d20896e (diff)
parentf530a50a949310aa9996d764eeaaba7458b7d6b6 (diff)
Merge branch 'master' into xgs4600-cli
Diffstat (limited to 'lib/oxidized/hook/exec.rb')
-rw-r--r--lib/oxidized/hook/exec.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/oxidized/hook/exec.rb b/lib/oxidized/hook/exec.rb
index 3f984c2..8a32412 100644
--- a/lib/oxidized/hook/exec.rb
+++ b/lib/oxidized/hook/exec.rb
@@ -23,10 +23,9 @@ class Exec < Oxidized::Hook
@cmd = cfg.cmd
raise "invalid cmd value" unless @cmd.is_a?(String) || @cmd.is_a?(Array)
end
-
rescue RuntimeError => e
raise ArgumentError,
- "#{self.class.name}: configuration invalid: #{e.message}"
+ "#{self.class.name}: configuration invalid: #{e.message}"
end
def run_hook ctx
@@ -45,7 +44,7 @@ class Exec < Oxidized::Hook
def run_cmd! env
pid, status = nil, nil
Timeout.timeout(@timeout) do
- pid = spawn env, @cmd , :unsetenv_others => true
+ pid = spawn env, @cmd, :unsetenv_others => true
pid, status = wait2 pid
unless status.exitstatus.zero?
msg = "#{@cmd.inspect} failed with exit value #{status.exitstatus}"