From d2434d90dcae2cc91e8fd22577ce7422635494c5 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 10 Aug 2023 09:18:18 +0200 Subject: [PATCH] ProjectExplorer: prefer git ssh over windows ssh In contrast to the git provided ssh the current ssh provided in windows ignores the SSH_ASKPASS environment variable. So we should prefer the implementation of git. This was done correctly in previous versions of Qt Creator since Environment::searchInPath first went through the additional provided directories before looking into the PATH environment variable. This behavior changed in 11.0 and now we look first into the entries of PATH. Change-Id: I4f3c21866d2d1a5151998fd527978ed482946ef8 Reviewed-by: Marcus Tillmanns Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/devicesupport/sshsettings.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/projectexplorer/devicesupport/sshsettings.cpp b/src/plugins/projectexplorer/devicesupport/sshsettings.cpp index b5f247609e7..be863437f80 100644 --- a/src/plugins/projectexplorer/devicesupport/sshsettings.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshsettings.cpp @@ -107,10 +107,10 @@ static FilePath filePathValue(const FilePath &value, const QStringList &candidat { if (!value.isEmpty()) return value; - const FilePaths additionalSearchPaths = sshSettings->searchPathRetriever(); + Environment env = Environment::systemEnvironment(); + env.prependToPath(sshSettings->searchPathRetriever()); for (const QString &candidate : candidateFileNames) { - const FilePath filePath = Environment::systemEnvironment() - .searchInPath(candidate, additionalSearchPaths); + const FilePath filePath = env.searchInPath(candidate); if (!filePath.isEmpty()) return filePath; }