purplesyringa / win-sudo

Add `sudo` command to Git Bash
MIT License
183 stars 55 forks source link

Windows Terminal + Git For Windows = ❌ #46

Open julianxhokaxhiu opened 3 years ago

julianxhokaxhiu commented 3 years ago

Hi,

I'm trying to use Win-Sudo on Git For Windows 2.32 through Windows Terminal using the native profile created during ( and offered through ) the installer. Overall the whole integration works fine, although win-sudo seems to apparently hang with no reply doesn't matter which command you run: su, sudo bash or whatever.

Have you ever tested this scenario and can you suggest please how to get it running? On my own end I dumped the printenv variables and the only difference I noticed was these two missing lines between each other, which are declared in Git Bash, but are NOT on Windows Terminal

TERM_PROGRAM=mintty
TERM_PROGRAM_VERSION=3.5.0

I would appreciate if you could find some time to check this, otherwise I'll try to fire a PR as soon as I'll find some time to work on it.

Thank you in advance, Julian

purplesyringa commented 3 years ago

I no longer use Windows as my main OS so I doubt I'll be able to fix this error myself. All help is appreciated.

art3xias23 commented 2 years ago

Hi guys, was anyone able to PR a fix for this?

riedel commented 1 year ago

It seems that windows terminal uses a different console driver. I checked and the problem is that the host session gets /dev/cons0 assigned and the backend only sees eg. /dev/cons1. mintty uses /dev/pty0 which you seem to be stable across elevation.

riedel commented 1 year ago

I think this is also a duplicate of #36

riedel commented 1 year ago

fixed in 5b2d65b4d38ee612598fa94980dacfa6e64b79c7 ?

Aroax commented 1 year ago

I am also encountering the same issue in Hyper using git-bash shell. Indefinite hang on sudo commands or trying to use su, after UAC prompt, using latest version of this tool.

samlletas commented 1 year ago

Installed this and seems to be working fine in windows terminal, something I did though was to remove the generated .bashrc file and add it's contents to my .bash_profile instead.