Do not use a list of command items to launch the LS on Linux/macOS

This commit is contained in:
Dominik Jain
2025-06-29 17:23:15 +02:00
parent 8314aef732
commit 58f70938cf
+8 -1
View File
@@ -2,6 +2,7 @@ import asyncio
import json
import logging
import os
import platform
import subprocess
import threading
import time
@@ -147,9 +148,15 @@ class SolidLanguageServerHandler:
child_proc_env = os.environ.copy()
child_proc_env.update(self.process_launch_info.env)
cmd = self.process_launch_info.cmd
is_windows = platform.system() == "Windows"
if not isinstance(cmd, str) and not is_windows:
# Since we are using the shell, we need to convert the command list to a single string
# on Linux/macOS
cmd = " ".join(cmd)
log.info("Starting language server process via command: %s", self.process_launch_info.cmd)
self.process = subprocess.Popen(
self.process_launch_info.cmd,
cmd,
stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,