Sha256: 7b471e9bd62da28238cbc9038b689270dac5b5bbec84bf27d6a319537a92cb85

Contents?: true

Size: 393 Bytes

Versions: 4

Compression:

Stored size: 393 Bytes

Contents

module Phase
  module Util
    module Shell
      include Console

      def shell(*args)
        options = args.extract_options!
        options.reverse_merge!({
          allow_failure: false
        })

        log "running: #{args.join(' ')}"
        succeeded = !!system(*args) || options[:allow_failure]

        yield $? unless succeeded

        succeeded
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
phase-1.0.2 lib/phase/util/shell.rb
phase-1.0.1 lib/phase/util/shell.rb
phase-1.0.0 lib/phase/util/shell.rb
phase-1.0.0.rc2 lib/phase/util/shell.rb