Skip to content

Commit

Permalink
Merge pull request puppetlabs#59 from binford2k/clone_as_non-root_user
Browse files Browse the repository at this point in the history
Allow non-root users to clone a repo

Merging my own PR because it's just a rework of an existing PR.
  • Loading branch information
binford2k committed Mar 18, 2013
2 parents 0cc694a + dcd0d14 commit 3e6a166
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppet/provider/vcsrepo/git.rb
Expand Up @@ -125,7 +125,9 @@ def clone_repository(source, path)
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
Expand Down

0 comments on commit 3e6a166

Please sign in to comment.