From 4bb82ccd947f7f078e25b9e27e996fa33be73531 Mon Sep 17 00:00:00 2001 From: feu Date: Mon, 30 Jul 2018 11:12:48 -0300 Subject: [PATCH] just one target.directory check in fetch_repo --- Library/Homebrew/download_strategy.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 61774fdcee..928e1172d9 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -580,16 +580,16 @@ class SubversionDownloadStrategy < VCSDownloadStrategy # Use "svn update" 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. - args = target.directory? ? ["update"] : ["checkout", url, target] + args = [] if revision ohai "Checking out #{@ref}" args << "-r" << revision end args << "--ignore-externals" if ignore_externals - if args[0] == "update" - system_command("svn", args: args, chdir: target.to_s) + if target.directory? + system_command("svn", args: ["update", *args], chdir: target.to_s) else - system_command("svn", args: args) + system_command("svn", args: ["checkout", url, target, *args]) end end