Skip to content

Normalize and prefix windows paths with Path.separator#10226

Merged
msujew merged 1 commit intoeclipse-theia:masterfrom
emilhammarstedtst:path-normalizing
Nov 1, 2021
Merged

Normalize and prefix windows paths with Path.separator#10226
msujew merged 1 commit intoeclipse-theia:masterfrom
emilhammarstedtst:path-normalizing

Conversation

@emilhammarstedtst
Copy link
Contributor

@emilhammarstedtst emilhammarstedtst commented Oct 5, 2021

What it does

Fixes: #10225

  • Prefix path with / if on the form of "c:/" into "/c:/"
  • Normalize windows path-separator paths to use / instead of \

How to test

Run any command that produces an output of windows-style-path in terminal and it should be clickable.

Review checklist

Reminder for reviewers

Contributed by STMicroelectronics

Signed-off-by: Emil HAMMARSTEDT emil.hammarstedt@st.com

@msujew msujew added the OS/Windows issues related to the Windows OS label Oct 5, 2021
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emilhammarstedtst thank you for the contribution 👍
Would you mind adding additional tests to path.spec.ts to cover the new use-cases?

- Prefix path with / if on the form of "c:/" into "/c:/"
- Normalize windows path-separator paths to use / instead of \\
- Added test section to test normalize windows styled paths with \

Contributed by STMicroelectronics

Signed-off-by: Emil HAMMARSTEDT <emil.hammarstedt@st.com>
@vince-fugnitto
Copy link
Member

@eclipse-theia/core any developers on windows that can help review this change?

@msujew msujew self-requested a review October 20, 2021 18:51
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the issue exists on master and is addressed by the changes:

2021-10-21.16-08-07.mp4

The changes look reasonable to me as well 👍

@msujew msujew merged commit 50efecb into eclipse-theia:master Nov 1, 2021
@msujew msujew added this to the 1.20.0 milestone Nov 1, 2021
@emilhammarstedtst emilhammarstedtst deleted the path-normalizing branch November 2, 2021 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OS/Windows issues related to the Windows OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Output/terminal linkmatcher does not match windows-style-paths resulting in no clickable links.

3 participants