Module: Phase::Util::Shell
Instance Method Summary collapse
Methods included from Console
Instance Method Details
#shell(*args) {|$?| ... } ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/phase/util/shell.rb', line 6 def shell(*args) = args. .reverse_merge!({ allow_failure: false }) log "running: #{args.join(' ')}" succeeded = !!system(*args) || [:allow_failure] yield $? unless succeeded succeeded end |