forked from qt-creator/qt-creator
		
	Utils/ProjectExplorer: Add IDevice::searchInPath
Change-Id: Ibc7cc7bd6bf3a7776681f7cd2fff051525b19f60 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
		@@ -719,6 +719,24 @@ bool DockerDevice::exists(const FilePath &filePath) const
 | 
			
		||||
    return exitCode == 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
FilePath DockerDevice::searchInPath(const FilePath &filePath) const
 | 
			
		||||
{
 | 
			
		||||
    const QString path = filePath.path();
 | 
			
		||||
 | 
			
		||||
    CommandLine dcmd{"docker", {"exec", d->m_container, "which", path}};
 | 
			
		||||
    QtcProcess proc;
 | 
			
		||||
    proc.setCommand(dcmd);
 | 
			
		||||
    proc.setWorkingDirectory("/tmp");
 | 
			
		||||
    proc.start();
 | 
			
		||||
    proc.waitForFinished();
 | 
			
		||||
 | 
			
		||||
    LOG("Run sync:" << dcmd.toUserOutput() << " result: " << proc.exitCode());
 | 
			
		||||
    QTC_ASSERT(proc.exitCode() == 0, return filePath);
 | 
			
		||||
 | 
			
		||||
    const QString output = proc.stdOut();
 | 
			
		||||
    return mapToGlobalPath(FilePath::fromString(output));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QList<FilePath> DockerDevice::directoryEntries(const FilePath &filePath,
 | 
			
		||||
                                               const QStringList &nameFilters,
 | 
			
		||||
                                               QDir::Filters filters) const
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user