-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workspace: normalize paths of workspace roots #7598
Conversation
1c9143b
to
375a0b7
Compare
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
@corneliusludmann thank you, I hadn't thought of the use case when I initially authored the changes. Would the suggestion you had of updating the |
@vince-fugnitto Do you mean that we normalize all root URIs in |
Yes exactly, it is what @corneliusludmann mentioned in his pull-request description:
|
@corneliusludmann Can you do alternative solution? It sounds great. |
Sure. I'll do this. |
I'm not sure which is the best place to put this. The call chain is: Is normalizing the path in theia/packages/workspace/src/browser/workspace-service.ts Lines 418 to 438 in 751a3d7
|
375a0b7
to
205d7ba
Compare
It seems to be fine. @vince-fugnitto Could you verify it please? |
Sure, I'll test it! @corneliusludmann do you mind updating the workspace-service tests for |
205d7ba
to
89e25c0
Compare
This avoids having workspace roots like /workspace/../../workspace when having relative paths in the workspace roots configuration. Fixes eclipse-theia#7597 Signed-off-by: Cornelius A. Ludmann <[email protected]>
89e25c0
to
40c6322
Compare
@vince-fugnitto I updated the PR with a test. I hope that's of some use. Feel free to modify or to propose changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the changes (terminal in multi-root) and it works correctly!
Thank you for taking care of the pull-request and also including a test case :)
What it does
This is my proposal to fix #7597 .
If you have configured a workspace folder like
you get a Terminal for URI
/workspace/theia/../../workspace
instead of/workspace
. This commit fixes this by using a normalized path in the terminal cwd selector.An alternative would be to fix the roots in the workspace service directly so that it benefits everywhere.
How to test
see #7597
Review checklist
Reminder for reviewers