fix(client): set { shell: true } in server options for "deno.{bat,cmd}"#1273
Merged
nayeemrmn merged 1 commit intodenoland:mainfrom Mar 12, 2025
Conversation
…md}" Fixes "Deno Language Server client: couldn't create connection to server. Error: spawn EINVAL" denoland#1257 I've debugged it locally to ensure it works on my Windows PC.
nayeemrmn
reviewed
Mar 12, 2025
Comment on lines
+178
to
+185
| } as Executable, | ||
| debug: { | ||
| command, | ||
| // disabled for now, as this gets super chatty during development | ||
| // args: ["lsp", "-L", "debug"], | ||
| args: ["lsp"], | ||
| options: { env }, | ||
| }, | ||
| options: { env, shell }, | ||
| } as Executable, |
Collaborator
There was a problem hiding this comment.
Why are the casts necessary? as Executable.
Contributor
Author
There was a problem hiding this comment.
It was just for typed intellisense so I knew what data type was expected. Without the cast, the structs weren't typed appropriately.
If necessary, I can revert it or use narrowing and type extraction to extract the correct type from the ServerOptions union.
Collaborator
|
Thanks for the fix @BinToss! If you can sign the CLA we'll land this |
Contributor
Author
|
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes "Deno Language Server client: couldn't create connection to server. Error: spawn EINVAL" #1257
I've debugged it locally to ensure it works on my Windows PC.
vscode_denois currently broken on Win32 VSCode 1.92 (July 2024) and later.spawn's/spawnSync's EINVAL error was introduced in the Node.js 18.x, 20.x, 21.x releases lines to mitigate CVE-2024-27980. The fix was implemented at nodejs/node@69ffc6d50d.Running a .bat or .cmd via spawn or spawnSync without assigning the shell option is prohibited in VSCode 1.92 and later.