projects
/
puppet_vcsrepo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e87ef1
)
The location of Puppet::Util[::Execution].withenv changed from Puppet 2.x to 3.x
author
Aaron Stone
<aaron@serendipity.cx>
Thu, 25 Jul 2013 19:09:51 +0000
(12:09 -0700)
committer
Aaron Stone
<aaron@serendipity.cx>
Thu, 25 Jul 2013 19:45:36 +0000
(12:45 -0700)
lib/puppet/provider/vcsrepo/cvs.rb
patch
|
blob
|
history
diff --git
a/lib/puppet/provider/vcsrepo/cvs.rb
b/lib/puppet/provider/vcsrepo/cvs.rb
index
6b64ba7
..
206e732
100644
(file)
--- a/
lib/puppet/provider/vcsrepo/cvs.rb
+++ b/
lib/puppet/provider/vcsrepo/cvs.rb
@@
-125,7
+125,12
@@
Puppet::Type.type(:vcsrepo).provide(:cvs, :parent => Puppet::Provider::Vcsrepo)
e = {}
end
- Puppet::Util::Execution.withenv e do
+ # The location of withenv changed from Puppet 2.x to 3.x
+ withenv = Puppet::Util.method(:withenv) if Puppet::Util.respond_to?(:withenv)
+ withenv = Puppet::Util::Execution.method(:withenv) if Puppet::Util::Execution.respond_to?(:withenv)
+ fail("Cannot set custom environment #{e}") if e && !withenv
+
+ withenv.call e do
Puppet.debug cvs *args
end
end