Docker: use mapped working directory for remote processes

Change-Id: Ibbc89f963ca42510cf072b242a5cdfdc0d4c23ff
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2021-10-13 09:59:53 +02:00
parent 8b45f1f6c5
commit 6e6753a064

View File

@@ -1576,7 +1576,7 @@ void DockerDevice::runProcess(QtcProcess &process) const
CommandLine cmd{"docker", {"exec"}}; CommandLine cmd{"docker", {"exec"}};
if (!workingDir.isEmpty()) { if (!workingDir.isEmpty()) {
cmd.addArgs({"-w", workingDir.path()}); cmd.addArgs({"-w", mapToDevicePath(workingDir)});
if (QTC_GUARD(workingDir.needsDevice())) // warn on local working directory for docker cmd if (QTC_GUARD(workingDir.needsDevice())) // warn on local working directory for docker cmd
process.setWorkingDirectory(FileUtils::homePath()); // reset working dir for docker exec process.setWorkingDirectory(FileUtils::homePath()); // reset working dir for docker exec
} }