Skip to content

Commit 4468370

Browse files
committed
Merge pull request #34 from b4ldr/master
Remove -l parameter from su. Changed branch to real branch
2 parents 5624532 + 6545b57 commit 4468370

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

manifests/repo.pp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
validate_bool($bare, $update)
3737

3838
if $owner != 'root' {
39-
$su_do = "${git::params::su_cmd} -l ${owner} -c \""
39+
$su_do = "${git::params::su_cmd} ${owner} -c \""
4040
$su_end = '"'
4141
} else {
4242
$su_do = ''
@@ -96,16 +96,16 @@
9696
exec {"git_${name}_co_branch":
9797
cwd => $path,
9898
provider => shell,
99-
command => "${su_do}${git::params::bin} checkout ${branch}${su_end}",
100-
unless => "${su_do}${git::params::bin} branch|${git::params::grep_cmd} -P '\\* ${branch}'${su_end}",
99+
command => "${su_do}${git::params::bin} checkout ${real_branch}${su_end}",
100+
unless => "${su_do}${git::params::bin} branch|${git::params::grep_cmd} -P '\\* ${real_branch}'${su_end}",
101101
require => Exec["git_repo_${name}"],
102102
}
103103
if $update {
104104
exec {"git_${name}_pull":
105105
cwd => $path,
106106
provider => shell,
107-
command => "${su_do}${git::params::bin} reset --hard origin/${branch}${su_end}",
108-
unless => "${su_do}${git::params::bin} fetch && ${git::params::bin} diff origin/${branch} --no-color --exit-code${su_end}",
107+
command => "${su_do}${git::params::bin} reset --hard origin/${real_branch}${su_end}",
108+
unless => "${su_do}${git::params::bin} fetch && ${git::params::bin} diff origin/${real_branch} --no-color --exit-code${su_end}",
109109
require => Exec["git_repo_${name}"],
110110
}
111111
}

0 commit comments

Comments
 (0)