Skip to content
Browse files
[Fix JENKINS-28943] Find windows ssh even if git is absolute path to …
…cmd dir

The path guesser in getPathToExe correctly checks for cmd and exe
suffixes, and correctly checks each entry in the PATH environment
variable.  Prior to this change, it did not check for the absolute
path having been specified with the cmd directory rather than the bin

The user had set C:\Program Files\Git\cmd\git.exe as the git program
for that slave.  That is an allowed setting, and it executed most git
commands correctly. It failed on ssh based commands.
  • Loading branch information
MarkEWaite committed Jun 20, 2015
1 parent f4d2340 commit 3e5ad16623e5583444298a5e9adee9c3bb230157
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/main/java/org/jenkinsci/plugins/gitclient/
@@ -1463,6 +1463,11 @@ private String getPathToExe(String userGitExe) {

File userGitFile = new File(userGitExe);
if (userGitFile.exists()) {
return userGitFile.getAbsolutePath();

return null;

0 comments on commit 3e5ad16

Please sign in to comment.