parent
7d88c110f6
commit
0a2dd832b9
@ -6,7 +6,7 @@ module Homebrew
|
||||
ARGV.formulae.map(&:path)
|
||||
end
|
||||
|
||||
Homebrew.install_gem_setup_path! "rubocop"
|
||||
Homebrew.install_gem_setup_path! "rubocop", "0.31.0"
|
||||
|
||||
args = [
|
||||
"--format", "simple", "--config",
|
||||
|
||||
@ -121,13 +121,16 @@ module Homebrew
|
||||
HOMEBREW_REPOSITORY.cd { `git show -s --format="%cr" HEAD 2>/dev/null`.chuzzle }
|
||||
end
|
||||
|
||||
def self.install_gem_setup_path! gem, executable=gem
|
||||
def self.install_gem_setup_path! gem, version=nil, executable=gem
|
||||
require "rubygems"
|
||||
ENV["PATH"] = "#{Gem.user_dir}/bin:#{ENV["PATH"]}"
|
||||
|
||||
unless quiet_system "gem", "list", "--installed", gem
|
||||
args = [gem]
|
||||
args << "-v" << version if version
|
||||
|
||||
unless quiet_system "gem", "list", "--installed", *args
|
||||
safe_system "gem", "install", "--no-ri", "--no-rdoc",
|
||||
"--user-install", gem
|
||||
"--user-install", *args
|
||||
end
|
||||
|
||||
unless which executable
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user