summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Ford <ben.ford@puppetlabs.com>2013-03-18 13:14:13 -0700
committerBen Ford <ben.ford@puppetlabs.com>2013-03-18 13:14:13 -0700
commit3e6a1661831446e042488de30aab900ef6eb17c4 (patch)
tree459fceb062b764c840465278145e4a3c15ff90e5 /lib
parent0cc694a568cbdc3adf2fea805651f2a30a5c99ac (diff)
parentdcd0d143bdc6244688e62aa555156e44ccf5f6bb (diff)
downloadpuppet-vcsrepo-3e6a1661831446e042488de30aab900ef6eb17c4.tar.gz
puppet-vcsrepo-3e6a1661831446e042488de30aab900ef6eb17c4.tar.bz2
Merge pull request #59 from binford2k/clone_as_non-root_user
Allow non-root users to clone a repo Merging my own PR because it's just a rework of an existing PR.
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb
index ad69f7d..3a48a6a 100644
--- a/lib/puppet/provider/vcsrepo/git.rb
+++ b/lib/puppet/provider/vcsrepo/git.rb
@@ -125,7 +125,9 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo)
end
if !File.exist?(File.join(@resource.value(:path), '.git'))
args.push(source, path)
- git_with_identity(*args)
+ Dir.chdir("/") do
+ git_with_identity(*args)
+ end
else
notice "Repo has already been cloned"
end