Class: Dip::Command::SubprocessRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/dip/command.rb

Class Method Summary collapse

Class Method Details

.call(cmdline, env: {}, panic: true, **options) ⇒ Object



22
23
24
25
26
27
28
29
30
# File 'lib/dip/command.rb', line 22

def self.call(cmdline, env: {}, panic: true, **options)
  status = ::Kernel.system(env, cmdline, **options)

  if !status && panic
    raise Dip::Error, "Command '#{cmdline}' executed with error"
  else
    status
  end
end