summaryrefslogtreecommitdiff
path: root/lib/chef/provider/subversion.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/provider/subversion.rb')
-rw-r--r--lib/chef/provider/subversion.rb18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/chef/provider/subversion.rb b/lib/chef/provider/subversion.rb
index 2cc4cb7ab3..7f49e2139f 100644
--- a/lib/chef/provider/subversion.rb
+++ b/lib/chef/provider/subversion.rb
@@ -121,16 +121,14 @@ class Chef
# up the revision id by asking the server
# If the specified revision is an integer, trust it.
def revision_int
- @revision_int ||= begin
- if /^\d+$/.match?(new_resource.revision)
- new_resource.revision
- else
- command = scm(:info, new_resource.repository, new_resource.svn_info_args, authentication, "-r#{new_resource.revision}")
- svn_info = shell_out!(command, run_options(cwd: cwd, returns: [0, 1])).stdout
-
- extract_revision_info(svn_info)
- end
- end
+ @revision_int ||= if /^\d+$/.match?(new_resource.revision)
+ new_resource.revision
+ else
+ command = scm(:info, new_resource.repository, new_resource.svn_info_args, authentication, "-r#{new_resource.revision}")
+ svn_info = shell_out!(command, run_options(cwd: cwd, returns: [0, 1])).stdout
+
+ extract_revision_info(svn_info)
+ end
end
alias :revision_slug :revision_int