Skip to content

Commit 657961b

Browse files
committed
Add strip to prevent inclusion of new line
1 parent a9724a5 commit 657961b

File tree

1 file changed

+5
-3
lines changed
  • python_packages/jupyter_lsp/jupyter_lsp

1 file changed

+5
-3
lines changed

python_packages/jupyter_lsp/jupyter_lsp/types.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,11 @@ def _default_node_roots(self):
260260

261261
# check for custom npm prefix
262262
if shutil.which("npm"):
263-
prefix = subprocess.run(
264-
["npm", "prefix", "-g"], check=True, capture_output=True
265-
).stdout.decode("utf-8")
263+
prefix = (
264+
subprocess.run(["npm", "prefix", "-g"], check=True, capture_output=True)
265+
.stdout.decode("utf-8")
266+
.strip()
267+
)
266268
roots += [pathlib.Path(prefix) / "lib"]
267269

268270
return roots

0 commit comments

Comments
 (0)