Merge pull request #9503 from chrisroberts/f-win-ssh-control

Fix ssh binary selection on windows
This commit is contained in:
Chris Roberts 2018-04-04 16:05:17 -07:00 committed by GitHub
commit dd1d91f2c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -68,7 +68,10 @@ module Vagrant
# include ssh, notably git, mingw and cygwin, but make sure ssh is in the path! # include ssh, notably git, mingw and cygwin, but make sure ssh is in the path!
# First try using the original path provided # 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 we didn't find an ssh executable, see if we shipped one
if !ssh_path if !ssh_path
ssh_path = Which.which("ssh") ssh_path = Which.which("ssh")

View File

@ -185,9 +185,14 @@ required.
## `VAGRANT_PREFER_SYSTEM_BIN` ## `VAGRANT_PREFER_SYSTEM_BIN`
This currently only applies to Windows systems.
If this is set, Vagrant will prefer using utility executables (like `ssh` and `rsync`) If this is set, Vagrant will prefer using utility executables (like `ssh` and `rsync`)
from the local system instead of those vendored within the Vagrant installation. from the local system instead of those vendored within the Vagrant installation.
This currently only applies to Windows systems.
Vagrant will default to using a system provided `ssh` on Windows. This
environment variable can also be used to disable that behavior to force Vagrant to
use the embedded `ssh` executable by setting it to `0`.
## `VAGRANT_SKIP_SUBPROCESS_JAILBREAK` ## `VAGRANT_SKIP_SUBPROCESS_JAILBREAK`