Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 directory. 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
Showing
with
5 additions
and 0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -1463,6 +1463,11 @@ private String getPathToExe(String userGitExe) { | ||
} | ||
} | ||
|
||
File userGitFile = new File(userGitExe); | ||
if (userGitFile.exists()) { | ||
return userGitFile.getAbsolutePath(); | ||
} | ||
|
||
return null; | ||
} | ||
|
||