Allow system binary lookup to be disabled on windows for ssh

Fixes #9433
This commit is contained in:
Chris Roberts 2018-02-22 15:15:41 -08:00
parent 6327782ae9
commit a1d23b4e97
1 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,10 @@ module Vagrant
# include ssh, notably git, mingw and cygwin, but make sure ssh is in the path!
# First try using the original path provided
ssh_path = Which.which("ssh", original_path: true)
if ENV["VAGRANT_PREFER_SYSTEM_BIN"] != "0"
ssh_path = Which.which("ssh", original_path: true)
end
# If we didn't find an ssh executable, see if we shipped one
if !ssh_path
ssh_path = Which.which("ssh")