forked from qt-creator/qt-creator
Docker: Fix DockerDevice::runProcess again
We need the on-device path in "docker exec", not the global version of it. This was not visible earlier as some more places used local paths, accidentally matching the on-device path. Change-Id: If1d7e94d2cf0730e85e5a89972d7eaa309743fa6 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -715,14 +715,18 @@ QByteArray DockerDevice::fileContents(const FilePath &filePath, int limit) const
|
|||||||
|
|
||||||
void DockerDevice::runProcess(QtcProcess &process) const
|
void DockerDevice::runProcess(QtcProcess &process) const
|
||||||
{
|
{
|
||||||
CommandLine dcmd{"docker", {"exec"}};
|
const QString origWd = process.workingDirectory();
|
||||||
dcmd.addArgs({"-w", process.workingDirectory()});
|
const CommandLine origCmd = process.commandLine();
|
||||||
dcmd.addArg(d->m_container);
|
|
||||||
dcmd.addArgs(process.commandLine());
|
|
||||||
|
|
||||||
LOG("Run" << dcmd.toUserOutput());
|
CommandLine cmd{"docker", {"exec"}};
|
||||||
|
cmd.addArgs({"-w", process.workingDirectory()});
|
||||||
|
cmd.addArg(d->m_container);
|
||||||
|
cmd.addArg(origCmd.executable().path()); // Cut off the docker://.../ bits.
|
||||||
|
cmd.addArgs(origCmd.splitArguments(osType()));
|
||||||
|
|
||||||
process.setCommand(dcmd);
|
LOG("Run" << cmd.toUserOutput());
|
||||||
|
|
||||||
|
process.setCommand(cmd);
|
||||||
process.start();
|
process.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user