Docker: Pass on working directory only if provided

Change-Id: I9ae62b441c0006b39d4bef5f06420e798c28c2a5
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-06-29 08:38:36 +02:00
parent ca1ce3a1ba
commit acec1a3a03

View File

@@ -991,7 +991,8 @@ void DockerDevice::runProcess(QtcProcess &process) const
const CommandLine origCmd = process.commandLine();
CommandLine cmd{"docker", {"exec"}};
cmd.addArgs({"-w", workingDir.path()});
if (!workingDir.isEmpty())
cmd.addArgs({"-w", workingDir.path()});
if (process.keepsWriteChannelOpen())
cmd.addArg("-i");
cmd.addArg(d->m_container);