From 474c000a1e0dbf6326962c08c3776040e7bc6085 Mon Sep 17 00:00:00 2001 From: Elfranne Date: Thu, 11 Apr 2024 14:45:13 +0200 Subject: [PATCH] clean up --- lib/puppet/provider/vcsrepo/git.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 3400b14b..65778452 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -731,15 +731,15 @@ def git_ssh_with_identity_ssh_file(*args) # Execute git with the given args, running it as the user specified. def exec_git(*args) - exec_args = { - failonfail: true, - combine: true, - custom_environment: { 'HOME' => Dir.home } - } - if @resource.value(:user) && @resource.value(:user) != Facter['id'].value - exec_args[:custom_environment] = { 'HOME' => Dir.home(@resource.value(:user)) } - exec_args[:uid] = @resource.value(:user) - end + exec_args = { + failonfail: true, + combine: true, + custom_environment: { 'HOME' => Dir.home }, + } + + if @resource.value(:user) && @resource.value(:user) != Facter['id'].value + exec_args[:custom_environment] = { 'HOME' => Dir.home(@resource.value(:user)) } + exec_args[:uid] = @resource.value(:user) end withumask do Puppet::Util::Execution.execute([:git, args], **exec_args)