Class: GitPivotalTrackerIntegration::Util::Shell
- Inherits:
-
Object
- Object
- GitPivotalTrackerIntegration::Util::Shell
- Defined in:
- lib/git-pivotal-tracker-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
28 29 30 31 32 33 34 35 |
# File 'lib/git-pivotal-tracker-integration/util/shell.rb', line 28 def self.exec(command, abort_on_failure = true) result = `#{command}` if $?.exitstatus != 0 && abort_on_failure abort "FAIL on command:#{command}" end result end |