Module: ShellWhisperer
- Defined in:
- lib/shell_whisperer.rb,
lib/shell_whisperer/version.rb
Defined Under Namespace
Classes: CommandFailed
Constant Summary collapse
- VERSION =
"1.0.0"
Class Method Summary collapse
Class Method Details
.run(cmd) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/shell_whisperer.rb', line 18 def self.run(cmd) `#{cmd} 2>&1`.tap do |result| unless $CHILD_STATUS.success? raise CommandFailed.new(cmd, result, $CHILD_STATUS.exitstatus) end end end |