forked from qt-creator/qt-creator
Copilot: Do not try to start copilot without nodejs
Avoids the attempt to start the client if nodejs cannot be found. Change-Id: I3783280120ca754291a92b3308c1192906facd08 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -120,6 +120,9 @@ void CopilotPlugin::extensionsInitialized()
|
||||
void CopilotPlugin::restartClient()
|
||||
{
|
||||
LanguageClient::LanguageClientManager::shutdownClient(m_client);
|
||||
|
||||
if (!CopilotSettings::instance().nodeJsPath().isExecutableFile())
|
||||
return;
|
||||
m_client = new CopilotClient(CopilotSettings::instance().nodeJsPath(),
|
||||
CopilotSettings::instance().distPath());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user