forked from qt-creator/qt-creator
ProjectExplorer: Re-use CommandLine::addCommandLineAsSingleArg()
... for its intended purpose. Change-Id: Idd3c2888e22f8d1d62902365e55456f043616866 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -486,11 +486,11 @@ qint64 SshProcessInterface::processId() const
|
|||||||
|
|
||||||
ProcessResult SshProcessInterface::runInShell(const CommandLine &command, const QByteArray &data)
|
ProcessResult SshProcessInterface::runInShell(const CommandLine &command, const QByteArray &data)
|
||||||
{
|
{
|
||||||
|
CommandLine cmd{d->m_device->filePath("/bin/sh"), {"-c"}};
|
||||||
|
cmd.addCommandLineAsSingleArg(command);
|
||||||
|
|
||||||
Process process;
|
Process process;
|
||||||
QString tmp;
|
process.setCommand(cmd);
|
||||||
ProcessArgs::addArg(&tmp, command.executable().path());
|
|
||||||
ProcessArgs::addArgs(&tmp, command.arguments());
|
|
||||||
process.setCommand({d->m_device->filePath("/bin/sh"), {"-c", tmp}});
|
|
||||||
process.setWriteData(data);
|
process.setWriteData(data);
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
process.runBlocking(2s);
|
process.runBlocking(2s);
|
||||||
|
Reference in New Issue
Block a user