lib/vectory/system_call.rb in vectory-0.5.0 vs lib/vectory/system_call.rb in vectory-0.6.0
- old
+ new
@@ -1,6 +1,7 @@
require "open3"
+require_relative "capture"
module Vectory
class SystemCall
TIMEOUT = 60
@@ -28,12 +29,12 @@
def log_cmd(cmd)
Vectory.ui.debug("Cmd: '#{cmd}'")
end
def execute(cmd)
- result = Utils.capture3_with_timeout(cmd,
- timeout: @timeout,
- kill_after: @timeout)
+ result = Capture.with_timeout(cmd,
+ timeout: @timeout,
+ kill_after: @timeout)
@stdout = result[:stdout]
@stderr = result[:stderr]
@status = result[:status]
rescue Errno::ENOENT => e
raise SystemCallError, e.inspect