aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2017-09-23 21:53:20 +0100
committerMike McQuaid2017-09-23 21:53:20 +0100
commit7f93d816a384f750a8c914ff52fb7728f4466309 (patch)
tree206338dc56b9d5b35e5f27370ec9dbc7be2460c8
parent6b3bb666e880d7140e1199ecedda852f9c68ab79 (diff)
downloadbrew-7f93d816a384f750a8c914ff52fb7728f4466309.tar.bz2
utils/git: don't fail when CoreTap is untapped.
This produces test failures on Linux where we intentionally avoid having it tapped.
-rw-r--r--Library/Homebrew/utils/git.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb
index 1fc01188c..28884ba5b 100644
--- a/Library/Homebrew/utils/git.rb
+++ b/Library/Homebrew/utils/git.rb
@@ -49,13 +49,13 @@ module Utils
return if git_available?
# we cannot install brewed git if homebrew/core is unavailable.
- raise "Git is unavailable" unless CoreTap.instance.installed?
-
- begin
- oh1 "Installing git"
- safe_system HOMEBREW_BREW_FILE, "install", "git"
- rescue
- raise "Git is unavailable"
+ if CoreTap.instance.installed?
+ begin
+ oh1 "Installing git"
+ safe_system HOMEBREW_BREW_FILE, "install", "git"
+ rescue
+ raise "Git is unavailable"
+ end
end
clear_git_available_cache