lib/command.rb in dev_commands-0.0.40 vs lib/command.rb in dev_commands-0.0.41
- old
+ new
@@ -72,10 +72,14 @@
self[:exit_code]=status.to_i
self[:elapsed] = timer.elapsed_str
self[:end_time] = Time.now
else
require_relative 'timeout.rb'
- self[:output] = run_with_timeout(self[:input], self[:timeout], 1)
+ #puts run_with_timeout(self[:input], self[:timeout], 1).to_s
+ #self[:output] = run_with_timeout(self[:input], self[:timeout], 1)
+ result=run_with_timeout(self[:input], self[:timeout], 1)
+ self[:output]=result[0]
+ self[:exit_code]=result[1]
self[:elapsed] = timer.elapsed_str
self[:end_time] = Time.now
if(timer.elapsed >= self[:timeout])
\ No newline at end of file