Skip to content

Commit

Permalink
Ensure tool dir is always on path (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
karthiknadig authored Aug 2, 2023
1 parent 3fead24 commit d792221
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bundled/tool/lsp_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ def update_sys_path(path_to_add: str, strategy: str) -> None:


# Ensure that we can import LSP libraries, and other bundled libraries.
BUNDLED_LIBS = os.fspath(pathlib.Path(__file__).parent.parent / "libs")
BUNDLE_DIR = pathlib.Path(__file__).parent.parent
BUNDLED_LIBS = os.fspath(BUNDLE_DIR / "libs")
# Always use bundled server files.
update_sys_path(os.fspath(BUNDLE_DIR / "tool"), "useBundled")
update_sys_path(
BUNDLED_LIBS,
os.getenv("LS_IMPORT_STRATEGY", "useBundled"),
Expand Down

0 comments on commit d792221

Please sign in to comment.