Method: Exec#run_hook

Defined in:
lib/oxidized/hook/exec.rb

#run_hook(ctx) ⇒ Object



29
30
31
32
33
34
35
36
37
38
# File 'lib/oxidized/hook/exec.rb', line 29

def run_hook(ctx)
  env = make_env ctx
  logger.debug "Execute: #{@cmd.inspect}"
  th = Thread.new do
    run_cmd! env
  rescue StandardError => e
    raise e unless @async
  end
  th.join unless @async
end