From 498fe53116a79611dbfb2cfb9e6ffe28805ed1e9 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 2 Sep 2022 17:42:55 +0200 Subject: [PATCH] CvsPlugin: Reuse vcsSynchronousExec() Change-Id: I8d30310d565c2f345ab98542c936a704108f21e2 Reviewed-by: Orgad Shaneh --- src/plugins/cvs/cvsplugin.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index dfae98886a6..3f25126b0d7 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -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();