Fix download strategy for SVN HEAD

After converting to Pathname to create paths, using '+=' will result in
path concatenation by '/', which result in weird path like
'gcc--svn/-HEAD'. This patch should fix this.

Closes Homebrew/homebrew#19233.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Xiyue Deng 2013-04-16 02:18:26 -07:00 committed by Jack Nagel
parent b7c0c53ffc
commit 869642e635

View File

@ -217,7 +217,7 @@ class SubversionDownloadStrategy < AbstractDownloadStrategy
@co = Pathname.new("#{HOMEBREW_CACHE}/#{name}--svn")
end
@co += "-HEAD" if ARGV.build_head?
@co = Pathname.new(@co.to_s + '-HEAD') if ARGV.build_head?
end
def cached_location