Class: Vagrant::Util::SafeEnv

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/util/safe_env.rb

Class Method Summary collapse

Class Method Details

.change_envObject

This yields an environment hash to change and catches any issues while changing the environment variables and raises a helpful error to end users.



7
8
9
10
11
# File 'lib/vagrant/util/safe_env.rb', line 7

def self.change_env
  yield ENV
rescue Errno::EINVAL
  raise Errors::EnvInval
end