Fix //wsl$ paths not working in MangleStartingDirectoryForWSL#12102
Conversation
This comment has been minimized.
This comment has been minimized.
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentdeconstructed devicefamily guardxfg pgorepro pgort PGU Timeline xfgTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:microsoft/terminal.git repository ✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
…l-mangling-but-for-real
… want to complain, then dont let me commit....
|
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
…2102) This PR does two things, which are best viewed as atomic commits: * e64ae7d: Move the `MangleStartingDirectoryForWSL` to `types/utils`. It doesn't _really_ make sense in `types`, since it's only really being used in a single place in TerminalConnection. However, TerminalConnection doesn't have tests, and types does. So this commit move the function there, and adds tests from #9223 to the types tests. * 42036c5: This actually fixes the bug in #11994. Unfortunately, `wsl --cd` will try to treat paths starting with `//wsl$` as a linux-relative path, when the user almost certainly wanted a windows-relative one. So we'll mangle that back into a path that looks like `\\wsl$\foo\bar`. * [x] closes #11994 * [x] I work here * [x] tests added 🎉 (cherry picked from commit b87b809)
|
🎉 Handy links: |
This PR does two things, which are best viewed as atomic commits:
MangleStartingDirectoryForWSLtotypes/utils. It doesn't really make sense intypes, since it's only really being used in a single place in TerminalConnection. However, TerminalConnection doesn't have tests, and types does. So this commit move the function there, and adds tests from When launching wsl, promote the starting directory to --cd #9223 to the types tests.wsl --cdwill try to treat paths starting with//wsl$as a linux-relative path, when the user almost certainly wanted a windows-relative one. So we'll mangle that back into a path that looks like\\wsl$\foo\bar.