class Gordon::Process
Public Class Methods
run(command)
click to toggle source
# File lib/gordon/process.rb, line 3 def self.run(command) pid = ::Process.spawn(command, out: $stdout, err: $stderr) _, exit_status = ::Process.wait2(pid) raise SystemCallError.new("Failed to execute [#{command}]. Exit code: #{exit_status}") unless exit_status == 0 true end