Scala language server: stop requiring old coursier

You run coursier with "cs" command nowadays.
Users of the new coursier no longer have the old
"coursier" command around.
Yet, the assertion required its presence.
That caused the project creation command to break.

After this change:
- the assertion passes if "cs" or "coursier" is there

("coursier" was only used to install the new "cs" if it was missing)
This commit is contained in:
Przemek Pokrywka authored and GitHub committed 2025-12-07 19:16:27 +01:00
1 parent e7f1260b3a
commit a56a82f2d2
1 file changed
+1 -1
@@ -61,8 +61,8 @@ class ScalaLanguageServer(SolidLanguageServer):
os.makedirs(metals_home, exist_ok=True)
metals_executable = os.path.join(metals_home, "metals")
coursier_command_path = shutil.which("coursier")
assert coursier_command_path is not None, "coursier is not installed or not in PATH."
cs_command_path = shutil.which("cs")
assert cs_command_path is not None or coursier_command_path is not None, "coursier is not installed or not in PATH."
if not os.path.exists(metals_executable):
if not cs_command_path: