~ not work as startingDirectory for WSL #15460

Closed
opened 2026-01-31 04:39:13 +00:00 by claunia · 8 comments
Owner

Originally created by @mveril on GitHub (Oct 6, 2021).

Windows Terminal version (or Windows build number)

1.11.2731.0

Other Software

WSL on Windows 11 version 10.0.22000.194

Steps to reproduce

Put ~ as startingDirectory for a WSL Distro

Expected Behavior

Start the profile at the $HOME directory exactly like when I manualy run the command wsl.exe --cd "~" in PowerShell

Actual Behavior

In my machine the terminal output say:
Le fichier spécifié est introuvable.

[processus terminé avec le code 4294967295]

Originally created by @mveril on GitHub (Oct 6, 2021). ### Windows Terminal version (or Windows build number) 1.11.2731.0 ### Other Software WSL on Windows 11 version 10.0.22000.194 ### Steps to reproduce Put `~` as `startingDirectory` for a WSL Distro ### Expected Behavior Start the profile at the `$HOME` directory exactly like when I manualy run the command `wsl.exe --cd "~" ` in PowerShell ### Actual Behavior In my machine the terminal output say: Le fichier spécifié est introuvable. [processus terminé avec le code 4294967295]
Author
Owner

@zadjii-msft commented on GitHub (Oct 6, 2021):

Hmm. 4294967295 is just ERROR_UNHANDLED_ERROR. I thought we would have fixed this in #9223, but that's apparently not true because I can repro this too.
image

/cc @DHowett

@zadjii-msft commented on GitHub (Oct 6, 2021): Hmm. 4294967295 is just `ERROR_UNHANDLED_ERROR`. I thought we would have fixed this in #9223, but that's apparently not true because I can repro this too. ![image](https://user-images.githubusercontent.com/18356694/136193359-06e8c38d-70fc-4dd6-a39c-1255239e42ae.png) /cc @DHowett
Author
Owner

@DHowett commented on GitHub (Oct 6, 2021):

That's very curious.

PID: 17380, Command line: "wsl.exe" --cd "C:\WINDOWS\system32\~" -d Debian

Uh, did we re-re-introduce relative path resolution?

Wait, I'm apparently the killer.

3c7ff8f2c0/src/cascadia/TerminalApp/TerminalPage.cpp (L921-L922)

Guess how long ~ is?

@DHowett commented on GitHub (Oct 6, 2021): That's very curious. ``` PID: 17380, Command line: "wsl.exe" --cd "C:\WINDOWS\system32\~" -d Debian ``` Uh, did we re-re-introduce relative path resolution? Wait, I'm apparently the killer. https://github.com/microsoft/terminal/blob/3c7ff8f2c052c661f56ff8c25f7f5b001ef08416/src/cascadia/TerminalApp/TerminalPage.cpp#L921-L922 Guess how long `~` is?
Author
Owner

@DHowett commented on GitHub (Oct 6, 2021):

This is a classic "2 unit tests, 0 integration tests" scenario.

I tested wsl -d ~ and ConptyConnection::_tryPromote..., as well as startingDirectory: '/all/sorts/of/linux/path'. :|

@DHowett commented on GitHub (Oct 6, 2021): This is a classic "[2 unit tests, 0 integration tests](https://v.redd.it/ynvs8s8n9ny31)" scenario. I tested `wsl -d ~` and `ConptyConnection::_tryPromote...`, as well as `startingDirectory: '/all/sorts/of/linux/path'`. :|
Author
Owner

@mveril commented on GitHub (Oct 19, 2021):

Hello @DHowett is there any chance that the patch will be applied before the stable version ?

@mveril commented on GitHub (Oct 19, 2021): Hello @DHowett is there any chance that the patch will be applied before the stable version ?
Author
Owner

@zadjii-msft commented on GitHub (Oct 19, 2021):

any chance that the patch will be applied before the stable version ?

Considering 1.12 is coming out (likely) tomorrow, and with it 1.11 is getting promoted to stable, I'm gonna guess no 😄

@zadjii-msft commented on GitHub (Oct 19, 2021): > any chance that the patch will be applied before the stable version ? Considering 1.12 is coming out (likely) tomorrow, and with it 1.11 is getting promoted to stable, I'm gonna guess _no_ 😄
Author
Owner

@mveril commented on GitHub (Oct 19, 2021):

Ok
Maybe in a servicing release I'm still very excited to upgrade and see more cool features tomorrow 🚀

@mveril commented on GitHub (Oct 19, 2021): Ok Maybe in a servicing release I'm still very excited to upgrade and see more cool features tomorrow 🚀
Author
Owner

@ghost commented on GitHub (Feb 3, 2022):

:tada:This issue was addressed in #12050, which has now been successfully released as Windows Terminal Preview v1.13.10336.0.🎉

Handy links:

@ghost commented on GitHub (Feb 3, 2022): :tada:This issue was addressed in #12050, which has now been successfully released as `Windows Terminal Preview v1.13.10336.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.13.10336.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@mveril commented on GitHub (Feb 20, 2022):

Thank you!
I can confirm that it works now! 🎉

@mveril commented on GitHub (Feb 20, 2022): Thank you! I can confirm that it works now! 🎉
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15460