diff options
| author | Jack Nagel | 2014-10-07 21:33:15 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-10-07 21:33:15 -0500 |
| commit | 09b7f40b251ab5800ec155ccb46914b786d2b645 (patch) | |
| tree | a38876fe0f35878dd2d80a5ea2737d8c317c2c30 /Library | |
| parent | cb862901ea5a6ac15e7953e142692aac2fa90a8c (diff) | |
| download | brew-09b7f40b251ab5800ec155ccb46914b786d2b645.tar.bz2 | |
Simplify UnsafeSubversionDownloadStrategy
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 30f1489d6..911401ad8 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -405,12 +405,16 @@ class SubversionDownloadStrategy < VCSDownloadStrategy end end + def fetch_args + [] + end + def fetch_repo target, url, revision=nil, ignore_externals=false # Use "svn up" when the repository already exists locally. # This saves on bandwidth and will have a similar effect to verifying the # cache as it will make any changes to get the right revision. svncommand = target.directory? ? 'up' : 'checkout' - args = ['svn', svncommand] + args = ['svn', svncommand] + fetch_args # SVN shipped with XCode 3.1.4 can't force a checkout. args << '--force' unless MacOS.version == :leopard args << url unless target.directory? @@ -425,17 +429,8 @@ StrictSubversionDownloadStrategy = SubversionDownloadStrategy # Download from SVN servers with invalid or self-signed certs class UnsafeSubversionDownloadStrategy < SubversionDownloadStrategy - def fetch_repo target, url, revision=nil, ignore_externals=false - # Use "svn up" when the repository already exists locally. - # This saves on bandwidth and will have a similar effect to verifying the - # cache as it will make any changes to get the right revision. - svncommand = target.directory? ? 'up' : 'checkout' - args = ['svn', svncommand, '--non-interactive', '--trust-server-cert', '--force'] - args << url unless target.directory? - args << target - args << '-r' << revision if revision - args << '--ignore-externals' if ignore_externals - quiet_safe_system(*args) + def fetch_args + %w[--non-interactive --trust-server-cert] end end |
