mirror of
https://github.com/tiennm99/serena.git
synced 2026-09-04 04:18:11 +00:00
Do not use a list of command items to launch the LS on Linux/macOS
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user