Module: Notis
- Defined in:
- lib/notis.rb,
lib/notis/version.rb
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.runit(command) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/notis.rb', line 5 def Notis.runit(command) begin stdout_str, stderr_str, status = Open3.capture3(command) if status.exitstatus == 0 return "#{stdout_str}" else STDERR.puts stderr_str #if the primary application fails, pass the error message to the user exit 1 end rescue => e STDERR.puts e. exit 1 end #end begin/rescue blocks end |