From f837d32ae456e97e6e5c1ee6546d77c028b15364 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 8 Feb 2013 22:29:53 -0800 Subject: [PATCH] Rename FileUtil to Which since its too close to FileUtils --- lib/vagrant/util/ssh.rb | 4 ++-- lib/vagrant/util/{file_util.rb => which.rb} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename lib/vagrant/util/{file_util.rb => which.rb} (98%) diff --git a/lib/vagrant/util/ssh.rb b/lib/vagrant/util/ssh.rb index fa211e3f3..912ef4645 100644 --- a/lib/vagrant/util/ssh.rb +++ b/lib/vagrant/util/ssh.rb @@ -1,9 +1,9 @@ require "log4r" -require "vagrant/util/file_util" require "vagrant/util/file_mode" require "vagrant/util/platform" require "vagrant/util/safe_exec" +require "vagrant/util/which" module Vagrant module Util @@ -55,7 +55,7 @@ module Vagrant def self.exec(ssh_info, opts={}) # Ensure the platform supports ssh. On Windows there are several programs which # include ssh, notably git, mingw and cygwin, but make sure ssh is in the path! - if !FileUtil.which("ssh") + if !Which.which("ssh") if Platform.windows? raise Errors::SSHUnavailableWindows, :host => ssh_info[:host], diff --git a/lib/vagrant/util/file_util.rb b/lib/vagrant/util/which.rb similarity index 98% rename from lib/vagrant/util/file_util.rb rename to lib/vagrant/util/which.rb index 89917a740..090d84010 100644 --- a/lib/vagrant/util/file_util.rb +++ b/lib/vagrant/util/which.rb @@ -2,7 +2,7 @@ require "vagrant/util/platform" module Vagrant module Util - class FileUtil + class Which # Cross-platform way of finding an executable in the PATH. # # which('ruby') #=> /usr/bin/ruby