From b0bf181788f4c0b0b5a9835133c3126e5011ec6c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 30 Oct 2013 12:33:20 -0700 Subject: [PATCH] install: search when formula isn't found. --- Library/Homebrew/cmd/install.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index e6772a1055..c6ae22294c 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -26,12 +26,19 @@ module Homebrew extend self end unless ARGV.force? perform_preinstall_checks - ARGV.formulae.each do |f| - begin - install_formula(f) - rescue CannotInstallFormulaError => e - ofail e.message + begin + ARGV.formulae.each do |f| + begin + install_formula(f) + rescue CannotInstallFormulaError => e + ofail e.message + end end + rescue FormulaUnavailableError => e + ofail e.message + require 'cmd/search' + puts 'Searching taps...' + puts_columns(search_taps(query_regexp(e.name))) end end