diff --git a/lib/vagrant/util/subprocess.rb b/lib/vagrant/util/subprocess.rb index 9ee04376c..af4646bc9 100644 --- a/lib/vagrant/util/subprocess.rb +++ b/lib/vagrant/util/subprocess.rb @@ -25,12 +25,13 @@ module Vagrant end def initialize(*command) + progname = command[0] @options = command.last.is_a?(Hash) ? command.pop : {} @command = command @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] + raise Errors::CommandUnavailableWindows, file: progname if Platform.windows? + raise Errors::CommandUnavailable, file: progname end @logger = Log4r::Logger.new("vagrant::util::subprocess") diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 0bb841986..f60684192 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -168,11 +168,11 @@ en: %{help} command_unavailable: |- - The executable '%(file)' Vagrant is trying to run was not + 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 + 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: |-