CvsPlugin: Reuse vcsSynchronousExec()

Change-Id: I8d30310d565c2f345ab98542c936a704108f21e2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2022-09-02 17:42:55 +02:00
parent b206eb211f
commit 498fe53116

View File

@@ -1402,16 +1402,10 @@ CvsResponse CvsPluginPrivate::runCvs(const FilePath &workingDirectory,
response.message =tr("No CVS executable specified.");
return response;
}
// Run, connect stderr to the output window
auto *command = VcsBaseClient::createVcsCommand(workingDirectory,
Environment::systemEnvironment());
command->addFlags(flags);
command->setCodec(outputCodec);
const CommandResult result = command->runCommand({executable, m_settings.addOptions(arguments)},
timeOutS);
delete command;
const CommandResult result = m_client->vcsSynchronousExec(workingDirectory,
{executable, m_settings.addOptions(arguments)},
flags, timeOutS, outputCodec);
response.result = CvsResponse::OtherError;
response.stdErr = result.cleanedStdErr();
response.stdOut = result.cleanedStdOut();