Vagrant reports properly error for not found command
This commit is contained in:
parent
0dfc6455ae
commit
a0774b5b5f
|
@ -25,12 +25,13 @@ module Vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
def initialize(*command)
|
def initialize(*command)
|
||||||
|
progname = command[0]
|
||||||
@options = command.last.is_a?(Hash) ? command.pop : {}
|
@options = command.last.is_a?(Hash) ? command.pop : {}
|
||||||
@command = command
|
@command = command
|
||||||
@command[0] = Which.which(@command[0]) if !File.file?(@command[0])
|
@command[0] = Which.which(@command[0]) if !File.file?(@command[0])
|
||||||
if !@command[0]
|
if !@command[0]
|
||||||
raise Errors::CommandUnavailableWindows, file: command[0] if Platform.windows?
|
raise Errors::CommandUnavailableWindows, file: progname if Platform.windows?
|
||||||
raise Errors::CommandUnavailable, file: command[0]
|
raise Errors::CommandUnavailable, file: progname
|
||||||
end
|
end
|
||||||
|
|
||||||
@logger = Log4r::Logger.new("vagrant::util::subprocess")
|
@logger = Log4r::Logger.new("vagrant::util::subprocess")
|
||||||
|
|
|
@ -168,11 +168,11 @@ en:
|
||||||
|
|
||||||
%{help}
|
%{help}
|
||||||
command_unavailable: |-
|
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
|
found in the PATH variable. This is an error. Please verify
|
||||||
this software is installed and on the path.
|
this software is installed and on the path.
|
||||||
command_unavailable_windows: |-
|
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
|
found in the %PATH% variable. This is an error. Please verify
|
||||||
this software is installed and on the path.
|
this software is installed and on the path.
|
||||||
config_invalid: |-
|
config_invalid: |-
|
||||||
|
|
Loading…
Reference in New Issue