From d196a2a61deee9290826407ab17b994e0747f0af Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Tue, 25 Aug 2015 16:14:04 -0700 Subject: Remove 2.7 from travis matrix I believe 2.7 in the matrix is an error, this module has never claimed support for 2.7 and 2.7 currently doesn't work (though fails in places that are not unit tested) --- .sync.yml | 6 ------ .travis.yml | 4 ---- 2 files changed, 10 deletions(-) diff --git a/.sync.yml b/.sync.yml index 02c6c83..f4b637c 100644 --- a/.sync.yml +++ b/.sync.yml @@ -1,11 +1,5 @@ --- .travis.yml: - script: "\"bundle exec rake spec SPEC_OPTS='--format documentation'\"" - extras: - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" Rakefile: unmanaged: true spec/spec_helper.rb: diff --git a/.travis.yml b/.travis.yml index 727f6e7..1155a2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,6 @@ matrix: env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes" - rvm: 2.1.6 env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0" - - rvm: 1.8.7 - env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" allow_failures: - rvm: 2.1.6 env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes" -- cgit v1.2.3 From ba9d0cf6c1d98ea70270faa5cf4e70997ea75595 Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Mon, 24 Aug 2015 17:07:37 -0700 Subject: MODULES-1232 Make sure HOME is set correctly --- lib/puppet/provider/vcsrepo/git.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 4623f8e..a34b154 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -3,7 +3,9 @@ require File.join(File.dirname(__FILE__), '..', 'vcsrepo') Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) do desc "Supports Git repositories" - commands :git => 'git' + has_command(:git, 'git') do + environment({ 'HOME' => ENV['HOME'] }) + end has_features :bare_repositories, :reference_tracking, :ssh_identity, :multiple_remotes, :user, :depth, :branch, :submodules @@ -457,7 +459,8 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) return ret end elsif @resource.value(:user) and @resource.value(:user) != Facter['id'].value - Puppet::Util::Execution.execute("git #{args.join(' ')}", :uid => @resource.value(:user), :failonfail => true) + env = Etc.getpwnam(@resource.value(:user)) + Puppet::Util::Execution.execute("git #{args.join(' ')}", :uid => @resource.value(:user), :failonfail => true, :custom_environment => {'HOME' => env['dir']}) else git(*args) end -- cgit v1.2.3