Module: Fue::Shell
- Defined in:
- lib/fue/shell.rb
Class Method Summary collapse
Class Method Details
.system!(*cmd) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/fue/shell.rb', line 6 def system!(*cmd) stdout, stderr, status = Open3.capture3(*cmd) raise ["exit code #{status}", stderr].compact.join("\n") unless status.success? stdout.slice!(0..-(1 + $INPUT_RECORD_SEPARATOR.size)) end |