Class: Dip::Command::SubshellRunner

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

Class Method Summary collapse

Class Method Details

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

Raises:



18
19
20
21
# File 'lib/dip/command.rb', line 18

def self.call(cmd, argv, env: {}, panic: true, **options)
  return if ::Kernel.system(env, cmd, *argv, options)
  raise Dip::Error, "Command '#{([cmd] + argv).join(' ')}' executed with error." if panic
end