class Vagrant::Util::SafeEnv

Public Class Methods

change_env() { |ENV| ... } click to toggle source

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

# File lib/vagrant/util/safe_env.rb, line 7
def self.change_env
  yield ENV
rescue Errno::EINVAL
  raise Errors::EnvInval
end