aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2015-09-11 11:00:07 +0100
committerMike McQuaid2015-09-11 11:00:27 +0100
commitb1ff9c42d67598d6d09a71ee4ef333847dd09e1b (patch)
treed251cb7f98eb97642a1f11f5310be59983b6a1a0 /Library/Homebrew/test
parent664e9e844a450d76051442c23261001b0a1acba6 (diff)
downloadbrew-b1ff9c42d67598d6d09a71ee4ef333847dd09e1b.tar.bz2
update: fix when `HEAD` doesn't exist.
e.g. when it's a detached `HEAD` through checking out a commit rather than a branch.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_updater.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_updater.rb b/Library/Homebrew/test/test_updater.rb
index 88f8c23aa..16f4f2e85 100644
--- a/Library/Homebrew/test/test_updater.rb
+++ b/Library/Homebrew/test/test_updater.rb
@@ -58,7 +58,7 @@ class UpdaterTests < Homebrew::TestCase
FormulaVersions.stubs(:new).returns(stub(:formula_at_revision => "2.0"))
@updater.diff = fixture(fixture_name)
@updater.in_repo_expect("git diff --quiet", true)
- @updater.in_repo_expect("git symbolic-ref --short HEAD", "master")
+ @updater.in_repo_expect("git symbolic-ref --short HEAD 2>/dev/null", "master")
@updater.in_repo_expect("git rev-parse -q --verify HEAD", "1234abcd")
@updater.in_repo_expect("git config core.autocrlf false")
@updater.in_repo_expect("git pull --ff --no-rebase --quiet origin refs/heads/master:refs/remotes/origin/master")