alup/puppet-rbenv — pull request #72 by logicminds (2013-05-21 05:48:42+00:00)
Title: fixes an issue where the git clone exec resource was being called everytime

For some reason when I used the rbenv::plugin, the creates parameter in this resource was not behaving correctly which caused errors when git clone is run. Essentially, git refuses to clone the repo when the destination already exists.

The fix in the pull request essentially does the same thing as creates but actually works.

Error: git clone git://github.com/jamis/rbenv-gemset.git /var/www/.rbenv/plugins/rbenv-gemset returned 128 instead of one of [0]

exec { "rbenv::plugin::checkout ${user} ${plugin_name}":
command => "git clone ${source} ${destination}",
user => $user,
group => $group,
creates => "$destination",
path => ['/usr/bin', '/usr/sbin'],
timeout => $timeout,
cwd => $home_path,
require => File["rbenv::plugins ${user}"],
}