Skip to content

Commit 09b719e

Browse files
committed
feat: update Deno installation to use shell script only
- Simplify ensure_installed method to use only the official shell script - Remove fallback installation methods for cleaner implementation - Use curl -fsSL https://deno.land/install.sh | sh for installation
1 parent 362f7a1 commit 09b719e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/lsp_client/clients/deno/client.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,14 @@ async def ensure_installed(self) -> None:
155155
logger.warning("deno not found, attempting to install...")
156156

157157
try:
158-
await anyio.run_process(["npm", "install", "-g", "deno"])
159-
logger.info("Successfully installed deno via npm")
158+
await anyio.run_process(
159+
["sh", "-c", "curl -fsSL https://deno.land/install.sh | sh"]
160+
)
161+
logger.info("Successfully installed deno via shell script")
160162
return
161163
except CalledProcessError as e:
162164
raise RuntimeError(
163-
"Could not install deno. Please install it manually with 'npm install -g deno'. "
165+
"Could not install deno. Please install it manually with:\n"
166+
"curl -fsSL https://deno.land/install.sh | sh\n\n"
164167
"See https://deno.land/ for more information."
165168
) from e

0 commit comments

Comments
 (0)