Sha256: 8052b87caf9bd549aa8f063ff218f74f0669b7d398d87037878979b7023c3095
Contents?: true
Size: 527 Bytes
Versions: 4
Compression:
Stored size: 527 Bytes
Contents
module Puppet::Util::Execution module_function # Run some code with a specific environment. Resets the environment back to # what it was at the end of the code. def withenv(hash) oldvals = {} hash.each do |name, val| name = name.to_s oldvals[name] = ENV[name] ENV[name] = val end yield ensure oldvals.each do |name, val| ENV[name] = val end end end # $Id: execution.rb 1568 2006-09-05 23:20:45Z luke $
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.22.4 | lib/puppet/util/execution.rb |
puppet-0.23.0 | lib/puppet/util/execution.rb |
puppet-0.23.1 | lib/puppet/util/execution.rb |
puppet-0.23.2 | lib/puppet/util/execution.rb |