def clear_environment(mode = default_env)
    case mode
      when :posix
        ENV.clear
      when :windows
        Puppet::Util::Windows::Process.get_environment_strings.each do |key, _|
          Puppet::Util::Windows::Process.set_environment_variable(key, nil)
        end
      else
        raise _("Unable to clear the environment for mode %{mode}") % { mode: mode }
    end
  end
def clear_environment(mode = default_env)
    case mode
      when :posix
        ENV.clear
      when :windows
        Puppet::Util::Windows::Process.get_environment_strings.each do |key, _|
          Puppet::Util::Windows::Process.set_environment_variable(key, nil)
        end
      else
        raise _("Unable to clear the environment for mode %{mode}") % { mode: mode }
    end
  end
Removes all environment variables
 @param mode [Symbol] Which operating system mode to use e.g. :posix or :windows.  Use nil to autodetect
 @api private