forked from qt-creator/qt-creator
Docker: Ensure workdir for processes is reachable
When starting a process, make sure that the working directory is reachable. Change-Id: I911239d03afd916411d7fb03da806211349ff7e4 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -222,8 +222,14 @@ CommandLine DockerProcessImpl::fullLocalCommandLine(bool interactive)
|
|||||||
QStringList args;
|
QStringList args;
|
||||||
|
|
||||||
if (!m_setup.m_workingDirectory.isEmpty()) {
|
if (!m_setup.m_workingDirectory.isEmpty()) {
|
||||||
QTC_CHECK(DeviceManager::deviceForPath(m_setup.m_workingDirectory) == m_device);
|
FilePath workingDir = m_setup.m_workingDirectory;
|
||||||
args.append({"cd", m_setup.m_workingDirectory.path()});
|
|
||||||
|
if (DeviceManager::deviceForPath(workingDir) != m_device) {
|
||||||
|
QTC_CHECK(m_device->ensureReachable(workingDir));
|
||||||
|
workingDir = workingDir.onDevice(m_device->rootPath());
|
||||||
|
}
|
||||||
|
|
||||||
|
args.append({"cd", workingDir.path()});
|
||||||
args.append("&&");
|
args.append("&&");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user