forked from qt-creator/qt-creator
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:
@@ -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()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user