From 22efc78ed5108a650b05319e3bdfa1ce16fe5098 Mon Sep 17 00:00:00 2001 From: Katarzyna Marek Date: Wed, 18 Oct 2023 17:46:23 +0200 Subject: [PATCH] fix: don't throw on reset build server when the same option reselected --- .../scala/scala/meta/internal/metals/PopupChoiceReset.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metals/src/main/scala/scala/meta/internal/metals/PopupChoiceReset.scala b/metals/src/main/scala/scala/meta/internal/metals/PopupChoiceReset.scala index 192b195941d..dc8b63b7398 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/PopupChoiceReset.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/PopupChoiceReset.scala @@ -35,13 +35,13 @@ class PopupChoiceReset( Future.successful(()) } else if (value == BuildServer) { scribe.info("Resetting build server selection.") - (for { + for { didChange <- bspConnector.switchBuildServer( workspace, slowConnect, ) - if didChange - } yield quickConnect()).ignoreValue + _ <- if (didChange) quickConnect() else Future.successful(()) + } yield () } else { Future.successful(()) }