Check inside a normal repo for existence #2

Merged
merged 1 commit into from Apr 10, 2012

Projects

None yet

2 participants

@GregSutcliffe
Member

Change target for non-bare repos, so we can create/chown the holding dir before doing the clone.

Without this change, it's not possible to do something like:

file { "/usr/share/foreman":
ensure => directory,
owner => 'foreman'
} ->
git-repo { "foreman: user => 'foreman' }

Because '/usr/share' is owned by root. Instead, you have to do the checkout as root and then chown everything afterwards - far messier.

@ohadlevy
Member

I guess this doesnt break the existing usage right?

@GregSutcliffe
Member

I can't see how it would - if you check out into $dir then $dir must exist along with $dir/.git. Even if you're doing things like $dir: ensure => directory afterwards, that should still work. Certainly it hasn't broken any existing modules I'm using.

@ohadlevy ohadlevy merged commit 4e57a53 into theforeman:master Apr 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment