Module: JekyllRecker::Shell
- Defined in:
- lib/jekyll_recker/shell.rb
Overview
Shell
Class Method Summary collapse
Class Method Details
.run(cmd) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/jekyll_recker/shell.rb', line 8 def self.run(cmd) out, err, status = Open3.capture3(cmd) return out if status.success? msg = " the command \\`\#{cmd}\\` failed!\n --- exit\n \#{status}\n --- stdout\n \#{out}\n --- stderr\n \#{err}\n ERROR\n\n raise msg\nend\n" |