forked from qt-creator/qt-creator
Dockerdevice: Make sure that container is started
When a QtcProcess is the first thing using a dockerdevice the container was not started and the call would fail. Adding updateContainerAccess to withDockerExecCmd makes sure that the container is started. Change-Id: I7e05df1aa5e05dc55606970214109b13b142181e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -143,7 +143,7 @@ public:
|
||||
|
||||
Environment environment();
|
||||
|
||||
CommandLine withDockerExecCmd(const CommandLine &cmd, bool interactive = false) const;
|
||||
CommandLine withDockerExecCmd(const CommandLine &cmd, bool interactive = false);
|
||||
|
||||
private:
|
||||
bool createContainer();
|
||||
@@ -395,11 +395,13 @@ void DockerDevice::updateContainerAccess() const
|
||||
d->updateContainerAccess();
|
||||
}
|
||||
|
||||
CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd, bool interactive) const
|
||||
CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd, bool interactive)
|
||||
{
|
||||
if (!m_settings)
|
||||
return {};
|
||||
|
||||
updateContainerAccess();
|
||||
|
||||
QStringList args;
|
||||
|
||||
args << "exec";
|
||||
|
||||
Reference in New Issue
Block a user