def environment(vagrantfile, **opts)
      path = File.expand_path(vagrantfile, root_path)
      file = File.basename(path)
      path = File.dirname(path)

      Util::SilenceWarnings.silence! do
        Environment.new({
          child:     true,
          cwd:       path,
          home_path: home_path,
          ui_class:  ui_class,
          vagrantfile_name: file,
        }.merge(opts))
      end
    end
def environment(vagrantfile, **opts)
      path = File.expand_path(vagrantfile, root_path)
      file = File.basename(path)
      path = File.dirname(path)

      Util::SilenceWarnings.silence! do
        Environment.new({
          child:     true,
          cwd:       path,
          home_path: home_path,
          ui_class:  ui_class,
          vagrantfile_name: file,
        }.merge(opts))
      end
    end
Loads another environment for the given Vagrantfile, sharing as much
 useful state from this Environment as possible (such as UI and paths).
 Any initialization options can be overidden using the opts hash.

 @param [String] vagrantfile Path to a Vagrantfile
 @return [Environment]