Skip to content

Commit

Permalink
tweaks for style
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Jun 9, 2013
1 parent 8906ae0 commit 6c99f3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 5 additions & 4 deletions lib/vagrant/util/subprocess.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 8 additions & 2 deletions templates/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6c99f3d

Please sign in to comment.