Class: PivotalIntegration::Util::Shell
- Inherits:
-
Object
- Object
- PivotalIntegration::Util::Shell
- Defined in:
- lib/pivotal-integration/util/shell.rb
Overview
Utilities for dealing with the shell
Class Method Summary collapse
-
.exec(command, abort_on_failure = true) ⇒ String
Executes a command.
Class Method Details
.exec(command, abort_on_failure = true) ⇒ String
Executes a command
27 28 29 30 31 32 33 34 |
# File 'lib/pivotal-integration/util/shell.rb', line 27 def self.exec(command, abort_on_failure = true) result = `#{command}` if $?.exitstatus != 0 && abort_on_failure abort 'FAIL' end result end |