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
start-ssh-agent.cmd
doesn't execute @CALL cmd %*
at the end of the script
#3975
Comments
This is the output when I try it here: C:\Users\me>cd "C:\Program Files\Git\cmd"
C:\Program Files\Git\cmd> cmd start-ssh-agent.exe /k echo "test"
"test"
C:\Program Files\Git\cmd> In other words: it works as expected here, without the indicated patch. Maybe this has something to do with delayed expansion? But I see that the script does enable that. Color me puzzled. |
and after the patch it works for both |
I tried this in CMD and in PowerShell, and it works for me in both. I am not opposed to accepting a PR with the patch (you will want to modify this file), but I want to understand first why it is needed. |
It's hard to quote parts of a screenshot, so I won't. Pro-tip: paste text as text, not as a picture, in the future. The thing about the "Found" line is that I do not get it, and when I run Even funnier: I do not get the |
oh right, sorry well I can see that this script uses almost everywhere delayed expansion or variable expansion, and in this line https://github.com/git-for-windows/MINGW-packages/blob/05e0ebb4a53a6d58aa49c57a4a7040f149533473/mingw-w64-git/start-ssh-agent.cmd#L83 I created issue for it seems the syntax is incorrect? https://ss64.com/nt/delayedexpansion.html I'm not an expert in batch/cmd scripting, but this line simply doesn't work in my cmd |
The concern I have is that it might actually work as designed and that something in the command preceding it goes wrong, and we would only paper over that. |
Also please note that the proposed patch changes the check from not >=1 to
<>1
…On Mon, Aug 8, 2022, 6:59 AM Johannes Schindelin ***@***.***> wrote:
this line simply doesn't work in my cmd
The concern I have is that it might actually work as designed and that
something in the command preceding it goes wrong, and we would only paper
over that.
—
Reply to this email directly, view it on GitHub
<#3975 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABZH5SEAMNFOEZ557YMXCQ3VYDSAPANCNFSM552IKL4A>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Setup
I'm using Git for windows, 64-bit
I'm running windows 11, 64-bit
What options did you set as part of the installation? Or did you choose the
defaults?
defaults
Any other interesting things about your environment that might be related
to the issue you're seeing?
I don't think so
Details
CMD
Minimal, Complete, and Verifiable example
this will help us understand the issue.
it should perform ssh initialization and at the end if there is no fail it should execute
@CALL cmd %*
so in my casecmd /k echo "test"
nothing executed because there is a typo,
instead of doing
it should be
URL to that repository to help us with testing?
I don't know the repository I should look into
The text was updated successfully, but these errors were encountered: