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