From 6c99f3dfa7d8f8c97006f15839f069f841653b03 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 9 Jun 2013 13:51:14 -0700 Subject: [PATCH] tweaks for style --- lib/vagrant/util/subprocess.rb | 9 +++++---- templates/locales/en.yml | 10 ++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index c9be8eafee9..f733ed3ce21 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -27,11 +27,12 @@ def self.execute(*command, &block) def initialize(*command) @options = command.last.is_a?(Hash) ? command.pop : {} @command = command - @command[0] = Which.which(@command[0]) unless File.exists? @command[0] - unless @command[0] - raise Errors::CommandUnavailableWindows if Platform.windows? - raise Errors::CommandUnavailable + @command[0] = Which.which(@command[0]) if !File.file? @command[0] + if !@command[0] + raise Errors::CommandUnavailableWindows, file: command[0] if Platform.windows? + raise Errors::CommandUnavailable, file: command[0] end + @logger = Log4r::Logger.new("vagrant::util::subprocess") end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 06979f7b79d..070e2a05f60 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -167,8 +167,14 @@ en: available below. %{help} - command_unavailable: "command binary could not be found. Is this application installed?" - command_unavailable_windows: "command executable not found in any directories in the %PATH% variable." + command_unavailable: |- + The executable '%(file)' Vagrant is trying to run was not + found in the PATH variable. This is an error. Please verify + this software is installed and on the path. + command_unavailable_windows: |- + The executable '%(file)' Vagrant is trying to run was not + found in the %PATH% variable. This is an error. Please verify + this software is installed and on the path. config_invalid: |- There are errors in the configuration of this machine. Please fix the following errors and try again: