forked from qt-creator/qt-creator
Docker: Fix searching for clangd
Environment::searchInPath() does not know from which device it came. Therefore it will take the PATH variable as it is ( without the device://... prefix ) and search for files on the local device. Change-Id: Iecddb5ee1beb4ac821a9ac592f6edb1fc0f68b54 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -182,10 +182,13 @@ DockerDeviceWidget::DockerDeviceWidget(const IDevice::Ptr &device)
|
||||
logView->clear();
|
||||
dockerDevice->updateContainerAccess();
|
||||
|
||||
const FilePath clangdPath = dockerDevice->systemEnvironment()
|
||||
.searchInPath("clangd", {}, [](const FilePath &clangd) {
|
||||
return Utils::checkClangdVersion(clangd);
|
||||
});
|
||||
const FilePath clangdPath = dockerDevice->filePath("clangd")
|
||||
.searchInPath({},
|
||||
FilePath::AppendToPath,
|
||||
[](const FilePath &clangd) {
|
||||
return Utils::checkClangdVersion(clangd);
|
||||
});
|
||||
|
||||
if (!clangdPath.isEmpty())
|
||||
m_clangdExecutable->setFilePath(clangdPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user