diff options
author | jonoterc <jon_obuchowski@terc.edu> | 2014-01-14 12:31:26 -0500 |
---|---|---|
committer | jonoterc <jon_obuchowski@terc.edu> | 2014-01-14 12:31:26 -0500 |
commit | 93b73f6877f9bdfdd291e2dd5ff5b8f6247d833d (patch) | |
tree | b7cdca6b583d67055a9c88b6701d1948fdb649da | |
parent | f252283cf1501960f627e121d852b05f67c7214c (diff) | |
download | puppet-vcsrepo-93b73f6877f9bdfdd291e2dd5ff5b8f6247d833d.tar.gz puppet-vcsrepo-93b73f6877f9bdfdd291e2dd5ff5b8f6247d833d.tar.bz2 |
fix svnlook behavior with plain directories
svnlook expects a sub-directory within a repository called "format"; when using svnlook
within a non-repository directory this causes it to throw an error. Adding a test for
that directory before executing svnlook.
-rw-r--r-- | lib/puppet/provider/vcsrepo/svn.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/puppet/provider/vcsrepo/svn.rb b/lib/puppet/provider/vcsrepo/svn.rb index e0d5b21..7856acd 100644 --- a/lib/puppet/provider/vcsrepo/svn.rb +++ b/lib/puppet/provider/vcsrepo/svn.rb @@ -24,8 +24,10 @@ Puppet::Type.type(:vcsrepo).provide(:svn, :parent => Puppet::Provider::Vcsrepo) if File.directory?(@resource.value(:path)) # :path is an svn checkout return true if File.directory?(File.join(@resource.value(:path), '.svn')) - # :path is an svn server - return true if svnlook('uuid', @resource.value(:path)) + if File.directory?(File.join(@resource.value(:path), 'format')) + # :path is an svn server + return true if svnlook('uuid', @resource.value(:path)) + end end false end |