Docker: Bark if there is no container before trying to run on it

Change-Id: I64bee9901a515d46aa18e35d5e4a26f9105519ea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-06-28 15:48:18 +02:00
parent 75ffccad0b
commit 4271b3a299

View File

@@ -1018,6 +1018,14 @@ bool DockerDevice::writeFileContents(const Utils::FilePath &filePath, const QByt
void DockerDevice::runProcess(QtcProcess &process) const
{
tryCreateLocalFileAccess();
if (d->m_container.isEmpty()) {
LOG("No container set to run " << process.commandLine().toUserOutput());
QTC_CHECK(false);
process.setResult(QtcProcess::StartFailed);
return;
}
const FilePath workingDir = process.workingDirectory();
const CommandLine origCmd = process.commandLine();