forked from qt-creator/qt-creator
Git: Take Prepend to PATH into account again, take #2
Amends b5a4d38022
, which uses FilePath::searchInPath
which does not exist in 5.0.
Task-number: QTCREATORBUG-26329
Change-Id: I94ac35cc95a47e4f82c6205ad24d8bdc69ddf1af
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -142,10 +142,10 @@ FilePath GitSettings::gitExecutable(bool *ok, QString *errorMessage) const
|
||||
|
||||
FilePath binPath = binaryPath.filePath();
|
||||
if (!binPath.isAbsolutePath()) {
|
||||
FilePaths searchPath = binPath.deviceEnvironment().path();
|
||||
Environment env = Environment::systemEnvironment();
|
||||
if (!path.filePath().isEmpty())
|
||||
searchPath.prepend(path.filePath());
|
||||
binPath = binPath.searchInPath(searchPath);
|
||||
env.prependOrSetPath(path.filePath().toString());
|
||||
binPath = env.searchInPath(binPath.toString());
|
||||
}
|
||||
if (binPath.isEmpty()) {
|
||||
if (ok)
|
||||
|
Reference in New Issue
Block a user