Issue: Nano and vim executables get stuck when opened with gsudo on cmd
AngelAGBL opened this issue · 5 comments
Issue Description
When I try to execute nano or vim from msys2 (yes, these programs are added to my PATH) with privileges on cmd they get stuck, this doesn't happen on powershell:
Steps to Reproduce
- Open cmd
- Execute
gsudo nano
orgsudo vim
Screenshots
Nano | Vim |
---|---|
This issue doesn't get solved using --direct mode, the only way to make this work is executing:
gsudo cmd /c nano
gsudo cmd /c vim
It would be useful to execute them directly with gsudo, so I'll thank you if you'll give it some solution
Context:
- Windows version: Win11 22H2 - Spanish
- gsudo version: v2.4.0 or below
I don't know what is the root cause of the problem, but here is a workaround that will add the cmd /c
automatically:
Please run:
gsudo config ExceptionList = "notepad.exe;powershell.exe;vim.exe;nano.exe;"
Thank you.
Please don't close the issue. I'll close it after, at least, adding vim
and nano
by default in the exceptionlist.
Ok, thanks a lot, that works
How have you installed vim and nano on windows? using a windows installer? using git-bash?
Where are your vim.exe
and nano.exe
files located?
(on cmd, run which vim
)
They are both installed from the msys2 project (https://www.msys2.org/) and are located in the C:\msys64\usr\bin
directory