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:
Christian Stenger
2023-05-31 12:15:48 +02:00
parent 58fb6f88a6
commit 1bc3cccbb4
2 changed files with 4 additions and 1 deletions

View File

@@ -93,7 +93,7 @@ void AuthWidget::updateClient(const Utils::FilePath &nodeJs, const Utils::FilePa
m_client = nullptr;
setState(Tr::tr("Sign in"), false);
m_button->setEnabled(false);
if (!nodeJs.exists() || !agent.exists()) {
if (!nodeJs.isExecutableFile() || !agent.exists()) {
return;
}