This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Place this blurb at the top of your Vagrantfile to allow the unpatched | |
| # version of the Vagrant vagrant-vbguest plugin to properly execute | |
| # in newer Ruby environments where File.exists is no longer supported | |
| # | |
| # Extend the Ruby File class to restore the deprecated exists method | |
| # calls File.exist instead | |
| unless File.respond_to?(:exists?) | |
| class << File | |
| def exists?(path) | |
| warn "File.exists? is deprecated; use File.exist? instead." unless ENV['SUPPRESS_FILE_EXISTS_WARNING'] |