Method: Eye::Process::System#execute

Defined in:
lib/eye/process/system.rb

#execute(cmd, cfg = {}) ⇒ Object



91
92
93
94
95
# File 'lib/eye/process/system.rb', line 91

def execute(cmd, cfg = {})
  defer { Eye::System.execute cmd, cfg }.tap do |res|
    notify(:debug, "Bad exit status of command #{cmd.inspect}(#{res[:exitstatus].inspect})") if res[:exitstatus] != 0
  end
end