Solve the brew install, brew rm, brew install problem for HEAD formula
The problem was that git checkout -b doesn't work the second time. This simple solution works by never creating a local branch.
This commit is contained in:
parent
96de6ba870
commit
57fc32d279
@ -150,7 +150,7 @@ class GitDownloadStrategy <AbstractDownloadStrategy
|
|||||||
ohai "Checking out #{@spec} #{@ref}"
|
ohai "Checking out #{@spec} #{@ref}"
|
||||||
case @spec
|
case @spec
|
||||||
when :branch
|
when :branch
|
||||||
safe_system 'git', 'checkout', '-b', @ref, "origin/#{@ref}"
|
safe_system 'git', 'checkout', "origin/#{@ref}"
|
||||||
when :tag
|
when :tag
|
||||||
safe_system 'git', 'checkout', @ref
|
safe_system 'git', 'checkout', @ref
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user