just one target.directory check in fetch_repo
This commit is contained in:
parent
c63d8813af
commit
4bb82ccd94
@ -580,16 +580,16 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
|
|||||||
# Use "svn update" when the repository already exists locally.
|
# Use "svn update" when the repository already exists locally.
|
||||||
# This saves on bandwidth and will have a similar effect to verifying the
|
# 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.
|
# cache as it will make any changes to get the right revision.
|
||||||
args = target.directory? ? ["update"] : ["checkout", url, target]
|
args = []
|
||||||
if revision
|
if revision
|
||||||
ohai "Checking out #{@ref}"
|
ohai "Checking out #{@ref}"
|
||||||
args << "-r" << revision
|
args << "-r" << revision
|
||||||
end
|
end
|
||||||
args << "--ignore-externals" if ignore_externals
|
args << "--ignore-externals" if ignore_externals
|
||||||
if args[0] == "update"
|
if target.directory?
|
||||||
system_command("svn", args: args, chdir: target.to_s)
|
system_command("svn", args: ["update", *args], chdir: target.to_s)
|
||||||
else
|
else
|
||||||
system_command("svn", args: args)
|
system_command("svn", args: ["checkout", url, target, *args])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user