Docker: Silence assert

We query the device with executables that may or may not exist.
So, expect the call to fail if the image does not contain the
respective executable in PATH.

Change-Id: Iff43879c72155de8a8a9276e26085d03ead61f2f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2021-06-29 08:19:45 +02:00
parent 8c7b6a7549
commit ca1ce3a1ba

View File

@@ -939,7 +939,8 @@ FilePath DockerDevice::searchInPath(const FilePath &filePath) const
proc.waitForFinished(); proc.waitForFinished();
LOG("Run sync:" << dcmd.toUserOutput() << " result: " << proc.exitCode()); LOG("Run sync:" << dcmd.toUserOutput() << " result: " << proc.exitCode());
QTC_ASSERT(proc.exitCode() == 0, return filePath); if (proc.exitCode() != 0)
return {};
const QString output = proc.stdOut().trimmed(); const QString output = proc.stdOut().trimmed();
return mapToGlobalPath(FilePath::fromString(output)); return mapToGlobalPath(FilePath::fromString(output));