Sha256: 7088b73b106ee2953bd88ef9c65f104bd4d1964cf4d9341108f1ef448542204b

Contents?: true

Size: 344 Bytes

Versions: 1

Compression:

Stored size: 344 Bytes

Contents

def has_bundler?
  Bundler
  true
rescue => exp
  return false
end

def ec(cmd,ops={})
  puts cmd unless ops[:silent]
  res = nil
  if has_bundler?
    Bundler.with_clean_env do
      res = `#{cmd}`
    end
  else
    res = `#{cmd}`
  end

  raise "bad cmd #{$?.to_i} #{cmd} #{res}" unless $?.to_i == 0
  puts res unless ops[:silent]
  res
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mharris_ext-1.7.0 lib/mharris_ext/cmd.rb