Docker: Use "type" instead of "which"

"which" fails for builtin commands, while "type" finds both
builtin and executables.

Change-Id: I2e508a01e28b827ed498add50f8faa9d58551e59
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Marcus Tillmanns
2023-10-05 10:31:26 +02:00
parent 1d2c942360
commit a70ead958e

View File

@@ -232,7 +232,7 @@ expected_str<void> DeviceShell::start()
expected_str<QByteArray> DeviceShell::checkCommand(const QByteArray &command) expected_str<QByteArray> DeviceShell::checkCommand(const QByteArray &command)
{ {
const QByteArray checkCmd = "(which " + command + " || echo '<missing>')\n"; const QByteArray checkCmd = "(type " + command + " || echo '<missing>')\n";
m_shellProcess->writeRaw(checkCmd); m_shellProcess->writeRaw(checkCmd);
if (!m_shellProcess->waitForReadyRead()) { if (!m_shellProcess->waitForReadyRead()) {