Docker: Show error when container environment retrieval failed

Change-Id: I2e2226493969e322c9dab44ceb5106b1a207369b
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
This commit is contained in:
hjk
2021-08-19 05:56:25 +02:00
parent 1b6c212928
commit bbe506d29b

View File

@@ -154,6 +154,9 @@ void DockerDeviceProcess::start(const Runnable &runnable)
connect(&m_process, &QtcProcess::readyReadStandardError,
this, &DeviceProcess::readyReadStandardError);
connect(&m_process, &QtcProcess::started, this, &DeviceProcess::started);
LOG("Running process:" << runnable.command.toUserOutput()
<< "in" << runnable.workingDirectory.toUserOutput());
dockerDevice->runProcess(m_process);
}
@@ -1482,6 +1485,10 @@ void DockerDevicePrivate::fetchSystemEnviroment()
const QString remoteOutput = proc.stdOut();
m_cachedEnviroment = Environment(remoteOutput.split('\n', Qt::SkipEmptyParts), q->osType());
const QString remoteError = proc.stdErr();
if (!remoteError.isEmpty())
qWarning("Cannot read container environment: %s\n", qPrintable(remoteError));
}
bool DockerDevicePrivate::runInContainer(const CommandLine &cmd) const