forked from qt-creator/qt-creator
SSH: Pass remote command as QString
The old implementation sent the command over the wire as-is, so we declared it as a QByteArray and let the caller choose the encoding. This doesn't make sense anymore, as the command is now passed to an external process as a QString anyway. Change-Id: Ib84bc0f871db2b45b93f71d924c4177cc28d3bb0 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -67,9 +67,10 @@ void SshKeyDeployer::deployPublicKey(const SshConnectionParameters &sshParams,
|
||||
this, &SshKeyDeployer::handleConnectionFailure);
|
||||
connect(&d->deployProcess, &SshRemoteProcessRunner::processClosed,
|
||||
this, &SshKeyDeployer::handleKeyUploadFinished);
|
||||
const QByteArray command = "test -d .ssh "
|
||||
const QString command = "test -d .ssh "
|
||||
"|| mkdir .ssh && chmod 0700 .ssh && echo '"
|
||||
+ reader.data() + "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys";
|
||||
+ QString::fromLocal8Bit(reader.data())
|
||||
+ "' >> .ssh/authorized_keys && chmod 0600 .ssh/authorized_keys";
|
||||
d->deployProcess.run(command, sshParams);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user