$(tty) returning wrong TTY #6195
Replies: 8 comments
-
The |
Beta Was this translation helpful? Give feedback.
-
I think any TTY would work, regardless of where it is. I'm getting /dev/ttyX on wsl.exe, or via the terminal app. So that seems to be all WSL1 |
Beta Was this translation helpful? Give feedback.
-
It isn't related to WSL1 vs WSL2, but whatever is sending output to The Linux penguin icon in the screencap looks somewhat suspect. Might or might not be related. To the extent you are launching Ubuntu from the Start menu, it would normally have an Ubuntu icon. Try the steps in the first screencap (with your WSL1 distro name of choice) and post the screencap. It is possible there was a behavioral change since 18363 but I don't have that build handy to check. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Okay.
Improbable. If Do the repro as suggested: Two powershell (or cmd) instances, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
You have a One big-hammer approach is to install a clean distribution of another name (say Ubuntu-20.04 from the store), put an |
Beta Was this translation helpful? Give feedback.
-
Makes sense that it returned only 2 I think, since there were only 2 lines in the file :D |
Beta Was this translation helpful? Give feedback.
-
Environment
Steps to reproduce
export GPG_TTY = "$(tty)"
git commit -S
to prompt te GPG password promptExpected behavior
GPG Password prompt opens on the terminal where
git commit -S
was run fromActual behavior
GPG Password prompt opens on the terminal which was opened first
Possible explanation
I think the $(tty) in ~/.bashrc does not return the TTY of the terminal that was opened, but rather the terminal which was opened first, which would explain why the GPG password prompt opens on the wrong terminal.
Twitter thread with @MicrosoftHelpt
Beta Was this translation helpful? Give feedback.
All reactions