summaryrefslogtreecommitdiff
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index 7617b13..4623f8e 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -111,7 +111,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
def working_copy_exists?
if @resource.value(:source) and File.exists?(File.join(@resource.value(:path), '.git', 'config'))
- File.readlines(File.join(@resource.value(:path), '.git', 'config')).grep(/#{default_url}/).any?
+ File.readlines(File.join(@resource.value(:path), '.git', 'config')).grep(/#{Regexp.escape(default_url)}/).any?
else
File.directory?(File.join(@resource.value(:path), '.git'))
end