def check_cwd
      desired_encoding = @env.root_path.to_s.encoding
      vagrant_cwd_filepath = @data_dir.join('vagrant_cwd')
      vagrant_cwd = if File.exist?(vagrant_cwd_filepath)
                      File.read(vagrant_cwd_filepath,
                        external_encoding: desired_encoding
                      ).chomp
                    end

      if !File.identical?(vagrant_cwd.to_s, @env.root_path.to_s)
        if vagrant_cwd
          ui.warn(I18n.t(
            'vagrant.moved_cwd',
            old_wd:     "#{vagrant_cwd}",
            current_wd: "#{@env.root_path.to_s}"))
        end
        File.write(vagrant_cwd_filepath, @env.root_path.to_s,
          external_encoding: desired_encoding
        )
      end
    end
def check_cwd
      desired_encoding = @env.root_path.to_s.encoding
      vagrant_cwd_filepath = @data_dir.join('vagrant_cwd')
      vagrant_cwd = if File.exist?(vagrant_cwd_filepath)
                      File.read(vagrant_cwd_filepath,
                        external_encoding: desired_encoding
                      ).chomp
                    end

      if !File.identical?(vagrant_cwd.to_s, @env.root_path.to_s)
        if vagrant_cwd
          ui.warn(I18n.t(
            'vagrant.moved_cwd',
            old_wd:     "#{vagrant_cwd}",
            current_wd: "#{@env.root_path.to_s}"))
        end
        File.write(vagrant_cwd_filepath, @env.root_path.to_s,
          external_encoding: desired_encoding
        )
      end
    end
Checks the current directory for a given machine
 and displays a warning if that machine has moved
 from its previous location on disk. If the machine
 has moved, it prints a warning to the user.