Remove unused variables
This commit is contained in:
parent
f172d3a6eb
commit
1a799f04e6
@ -118,8 +118,6 @@ class FormulaAuditor
|
||||
end
|
||||
|
||||
def audit_deps
|
||||
problems = []
|
||||
|
||||
# Don't depend_on aliases; use full name
|
||||
aliases = Formula.aliases
|
||||
f.deps.select { |d| aliases.include? d.name }.each do |d|
|
||||
@ -163,8 +161,8 @@ class FormulaAuditor
|
||||
def audit_conflicts
|
||||
f.conflicts.each do |req|
|
||||
begin
|
||||
conflict_f = Formula.factory req.formula
|
||||
rescue
|
||||
Formula.factory req.formula
|
||||
rescue FormulaUnavailableError
|
||||
problem "Can't find conflicting formula \"#{req.formula}\"."
|
||||
end
|
||||
end
|
||||
|
||||
@ -11,7 +11,7 @@ module Homebrew extend self
|
||||
HOMEBREW_CELLAR.children.each do |rack|
|
||||
begin
|
||||
cleanup_formula rack.basename.to_s if rack.directory?
|
||||
rescue FormulaUnavailableError => e
|
||||
rescue FormulaUnavailableError
|
||||
# Don't complain about Cellar folders that are from DIY installs
|
||||
# instead of core formulae.
|
||||
end
|
||||
|
||||
@ -25,7 +25,6 @@ module Homebrew extend self
|
||||
master_updater.pull!
|
||||
report.merge!(master_updater.report)
|
||||
|
||||
new_files = []
|
||||
Dir["Library/Taps/*"].each do |tapd|
|
||||
next unless File.directory?(tapd)
|
||||
|
||||
|
||||
@ -228,7 +228,7 @@ class Formula
|
||||
# we allow formulae to do anything they want to the Ruby process
|
||||
# so load any deps before this point! And exit asap afterwards
|
||||
yield self
|
||||
rescue RuntimeError, SystemCallError => e
|
||||
rescue RuntimeError, SystemCallError
|
||||
%w(config.log CMakeCache.txt).each do |fn|
|
||||
(HOMEBREW_LOGS/name).install(fn) if File.file?(fn)
|
||||
end
|
||||
@ -294,7 +294,7 @@ class Formula
|
||||
names.each do |name|
|
||||
yield begin
|
||||
Formula.factory(name)
|
||||
rescue => e
|
||||
rescue
|
||||
# Don't let one broken formula break commands. But do complain.
|
||||
onoe "Failed to import: #{name}"
|
||||
next
|
||||
@ -543,7 +543,7 @@ protected
|
||||
mkdir_p(logd)
|
||||
|
||||
rd, wr = IO.pipe
|
||||
pid = fork do
|
||||
fork do
|
||||
rd.close
|
||||
$stdout.reopen wr
|
||||
$stderr.reopen wr
|
||||
@ -570,7 +570,7 @@ protected
|
||||
raise ErrorDuringExecution
|
||||
end
|
||||
end
|
||||
rescue ErrorDuringExecution => e
|
||||
rescue ErrorDuringExecution
|
||||
raise BuildError.new(self, cmd, args, $?)
|
||||
ensure
|
||||
f.close if f and not f.closed?
|
||||
|
||||
@ -219,7 +219,7 @@ class FormulaInstaller
|
||||
if f.keg_only?
|
||||
begin
|
||||
Keg.new(f.prefix).optlink
|
||||
rescue Exception => e
|
||||
rescue Exception
|
||||
onoe "Failed to create: #{f.opt_prefix}"
|
||||
puts "Things that depend on #{f} will probably not build."
|
||||
end
|
||||
@ -302,7 +302,7 @@ class FormulaInstaller
|
||||
|
||||
Tab.create(f, build_argv).write # INSTALL_RECEIPT.json
|
||||
|
||||
rescue Exception => e
|
||||
rescue Exception
|
||||
ignore_interrupts do
|
||||
# any exceptions must leave us with nothing installed
|
||||
f.prefix.rmtree if f.prefix.directory?
|
||||
|
||||
@ -54,7 +54,7 @@ class FormulaTests < Test::Unit::TestCase
|
||||
HOMEBREW_CACHE.mkpath unless HOMEBREW_CACHE.exist?
|
||||
nostdout do
|
||||
f = TestBallWithMirror.new
|
||||
tarball, downloader = f.fetch
|
||||
_, downloader = f.fetch
|
||||
assert_equal f.url, "file:///#{TEST_FOLDER}/bad_url/testball-0.1.tbz"
|
||||
assert_equal downloader.url, "file:///#{TEST_FOLDER}/tarballs/testball-0.1.tbz"
|
||||
end
|
||||
|
||||
@ -60,7 +60,7 @@ class VersionParsingTests < Test::Unit::TestCase
|
||||
end
|
||||
|
||||
def test_bad_version
|
||||
assert_raises(RuntimeError) { f = TestBadVersion.new }
|
||||
assert_raises(RuntimeError) { TestBadVersion.new }
|
||||
end
|
||||
|
||||
def test_version_all_dots
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user