From ed8e9fd606fe99f7d5e17ee9556793e514b6c49c Mon Sep 17 00:00:00 2001 From: Sally O'Malley Date: Thu, 21 Jan 2016 17:14:07 -0500 Subject: [PATCH] Update ssh_helpers.rb --- lib/rhc/commands/git_clone.rb | 2 +- lib/rhc/ssh_helpers.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/rhc/commands/git_clone.rb b/lib/rhc/commands/git_clone.rb index 38e306a01..2fa2eeccf 100644 --- a/lib/rhc/commands/git_clone.rb +++ b/lib/rhc/commands/git_clone.rb @@ -23,7 +23,7 @@ def run(app_name) 0 else - error "You do not have git installed. In order to fully interact with OpenShift you will need to install and configure a git client.#{RHC::Helpers.windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client https://git-for-windows.github.io/ : ''}" + error "You do not have git installed. In order to fully interact with OpenShift you will need to install and configure a git client.#{RHC::Helpers.windows? ? ' We recommend this free application: Git for Windows - a basic git command line and GUI client https://git-for-windows.github.io/.' : ''}" 2 end end diff --git a/lib/rhc/ssh_helpers.rb b/lib/rhc/ssh_helpers.rb index f6f136a85..b334a8e5e 100644 --- a/lib/rhc/ssh_helpers.rb +++ b/lib/rhc/ssh_helpers.rb @@ -461,10 +461,11 @@ def discover_ssh_executable # looks for ssh.exe from msysgit or plink.exe from PuTTY, either on path or specific locations guessing_locations << discover_windows_executables do |base| - [ + from_path = ENV['PATH'].split(File::PATH_SEPARATOR).map {|p| p + File::ALT_SEPARATOR + "ssh.exe" } + from_path + [ 'ssh.exe', "#{base}\\Git\\bin\\ssh.exe", - "#{base}\\Git\\usr\\bin\\ssh.exe", + #"#{base}\\Git\\usr\\bin\\ssh.exe", "#{base}\\ssh.exe", 'plink.exe', "#{base}\\PuTTY\\plink.exe",