-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shell-host.c does not interpret the single quoted file path #895
Comments
It looks like the same thing happens if you set PowerShell as the default shell in the registry, so it's not just a problem with cmd.exe. |
Windows and specially powershell really really suck hard. |
@bingbing8 Is there any progress on this issue? |
@doggy8088 we are working #1082, #1211, and this one together to escape double quotes in a central place. It is in progress. |
@doggy8088, do you have a repro command for me to validate the change? |
@bingbing8 Just simply |
@doggy8088, I tried with powershell as default shell, it works fine
The reason it does not work when the default shell is cmd is that cmd does not consume the single quotes, it simply pass to the executable. if you run this locally in your cmd prompt, it also failed.
|
Hi @bingbing8, I'm trying to clone a Git repo from the server, which I set up with OpenSSH on Windows (
I've checked a number of related threads (#752, #1237) and for some reason setting powershell as default Shell does not resolve the issue for me. At the same time, the workaround, described here works fine, so I'm assuming it's not permissions, or bad URL issue. Unfortunately, the mentioned workaround is not acceptable for me, as it requires configuration to be done by each client, so I'm really hoping to sort things out with powershell used as a default shell. I'm happy to provide additional details for troubleshooting, please let me know which details/log files would help identify the root cause? |
I've got the same comment as @dmitry-cherkas and I'm running the same version of openssh. Setting the DefaultShell of the openSSH HKLM to powershell does not work. Only the workaround shown here permitted me access to my git repository. |
This is still happening to this day. |
Please answer the following
If it is a terminal issue then please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
"OpenSSH for Windows" version
0.0.20.0
Server OperatingSystem
win10
Client OperatingSystem
Win10
What is failing
shell-host.c passes through to cmd.exe, single quotes as literals. The literal single quotes become part of the file path name, resulting in an incorrect file path.
Expected output
shell-host.c should interpret the single quoted file path correctly
Actual output
The text was updated successfully, but these errors were encountered: