Repository navigation
Conversation
…path The working directory was set with URI.getRawPath(), which keeps the percent-encoding (%C3%A9 for an accented letter, %20 for a space), so the language server could not start in a project whose path contains one: "CreateProcess error=267" on Windows. Paths.get(URI) gives the actual file system path. Fixes eclipse-wildwebdeveloper#2277 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GviovNL1A9qQNNC72f312S Signed-off-by: Hélios GILLES <[email protected]>
Author
|
@sebthom could you review this one when you have time? As the author of the Markdown and Astro language server integrations, you know this code best. It is a small fix: the working directory came from |
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 #2277.
MarkdownLanguageServerandAstroLanguageServerset the working directory of the server process withprojectRootUri.getRawPath(), which keeps the percent-encoding of the URI (%C3%A9foré,%20for a space). In a project whose path contains such a character the directory does not exist and the process cannot start (CreateProcess error=267on Windows,Cannot run program ... (in directory ".../%C3%89v%C3%A9nements ...")on Linux).The change: the working directory is now
Paths.get(projectRootUri).toString(), the decoded file system path. For a URI that is not afile:URI, the working directory set in the constructor (user.dir) is kept, sincePaths.getcannot convert it (before, its raw path was used, which is not a local directory either).AstroLanguageServeralso gets thenullcheck thatMarkdownLanguageServeralready had.Test:
TestMarkdown.languageServerStartsInProjectWithAccentAndSpaceInPathopens a Markdown file of a project namedÉvénements <n>and waits for the Markdown language server. It fails without the change (the server does not start, with the error above in the workspace log) and passes with it.TestMarkdown(13 tests) andTestAstropass; no new compiler warning.🤖 Generated with Claude Code
https://claude.ai/code/session_01GviovNL1A9qQNNC72f312S