aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/dev-cmd/test-bot.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb
index 7a9819dfa..69fa1bd18 100644
--- a/Library/Homebrew/dev-cmd/test-bot.rb
+++ b/Library/Homebrew/dev-cmd/test-bot.rb
@@ -683,12 +683,16 @@ module Homebrew
git "reset", "--hard"
git "checkout", "-f", "master"
git "clean", "-ffdx"
- HOMEBREW_REPOSITORY.cd do
- safe_system "git", "reset", "--hard"
- safe_system "git", "checkout", "-f", "master"
- # This will uninstall all formulae, as long as
- # HOMEBREW_REPOSITORY == HOMEBREW_PREFIX, which is true on the test bots
- safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/" unless ENV["HOMEBREW_RUBY"] == "1.8.7"
+ unless @repository == HOMEBREW_REPOSITORY
+ HOMEBREW_REPOSITORY.cd do
+ safe_system "git", "reset", "--hard"
+ safe_system "git", "checkout", "-f", "master"
+ # This will uninstall all formulae, as long as
+ # HOMEBREW_REPOSITORY == HOMEBREW_PREFIX, which is true on the test bots
+ unless ENV["HOMEBREW_RUBY"] == "1.8.7"
+ safe_system "git", "clean", "-ffdx", "--exclude=/Library/Taps/"
+ end
+ end
end
pr_locks = "#{@repository}/.git/refs/remotes/*/pr/*/*.lock"
Dir.glob(pr_locks) { |lock| FileUtils.rm_rf lock }