From ca1ce3a1bad473b4f68dee9531a12d614301b67e Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 29 Jun 2021 08:19:45 +0200 Subject: [PATCH] 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 --- src/plugins/docker/dockerdevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/docker/dockerdevice.cpp b/src/plugins/docker/dockerdevice.cpp index cafa6e9b850..faf7218d38f 100644 --- a/src/plugins/docker/dockerdevice.cpp +++ b/src/plugins/docker/dockerdevice.cpp @@ -939,7 +939,8 @@ FilePath DockerDevice::searchInPath(const FilePath &filePath) const proc.waitForFinished(); 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(); return mapToGlobalPath(FilePath::fromString(output));