Merge pull request #821 from przemek-pokrywka/patch-1

Scala language server: stop requiring old coursier
This commit is contained in:
Dominik Jain authored and GitHub committed 2025-12-08 15:28:08 +01:00
commit b845dcb393
1 file changed
+2 -1
@@ -61,11 +61,12 @@ 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:
assert coursier_command_path is not None
log.info("'cs' command not found. Trying to install it using 'coursier'.")
try:
log.info("Running 'coursier setup --yes' to install 'cs'...")