diff options
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/cleanup.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 1 | ||||
| -rw-r--r-- | Library/Homebrew/formula.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_versions.rb | 2 |
7 files changed, 11 insertions, 14 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index f880db36b..b391bc0e3 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -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 diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 490065606..86607b2e2 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -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 diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index db8d8d79c..838351e68 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -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) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 6d45d5ae3..7b8877618 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -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? diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 8dbd318a9..2395efc2f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -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? diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 50176a967..36a243db2 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -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 diff --git a/Library/Homebrew/test/test_versions.rb b/Library/Homebrew/test/test_versions.rb index 01b2eb2a2..53361c358 100644 --- a/Library/Homebrew/test/test_versions.rb +++ b/Library/Homebrew/test/test_versions.rb @@ -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 |
