Module: Hydra::Derivatives::ShellBasedProcessor::ClassMethods

Defined in:
lib/hydra/derivatives/shell_based_processor.rb

Instance Method Summary collapse

Instance Method Details

#execute(command) ⇒ Object



41
42
43
44
45
46
47
48
49
# File 'lib/hydra/derivatives/shell_based_processor.rb', line 41

def execute(command)
  stdin, stdout, stderr, wait_thr = popen3(command)
  stdin.close
  out = stdout.read
  stdout.close
  err = stderr.read
  stderr.close
  raise "Unable to execute command \"#{command}\"\n#{err}" unless wait_thr.value.success?
end