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
go get closes 'cmd' or 'powershell' terminal on Windows #22121
Comments
@pietromenna is it possible that you have go.bat file somewhere in your PATH that gets executed before go command does? For example:
Running last command will just close my command window. Alex |
http://nurmi-labs.blogspot.com/2016/11/git.html Any differences running your example command in the following? C:\Programmer\Git\git-bash.exe --cd-to-home %SystemRoot%\system32\cmd.exe Adjust the PATH for git-bash.exe to your installation. |
@alexbrainman Thanks for your help. It was not the case. I tried:
So it is not a batch file. @forskning When executed on bash the problem is gone. But somehow this is still a bug, it does not work native on Windows. The expectation remains: it should work with Is there any debugging which I could run on my side to help to identify the root cause? |
@pietromenna In your opening entry for this thread you mentioned batch files. IIRC, confer to the link I provided, Git-2.10.0-32-bit.exe being an older version, I believe when running the installer, the current version likely is not different in this respect, one has the option to utilise "Git from Git Bash Only". Do you recall which option you selected in the installer window "Adjusting your PATH environment"? |
@forskning we have some batch files, but the same problem occurs with executing I looked into the link you provided, and confirmed that using from It must not be mandatory to execute from bash when you run on Windows. That is my point. I reproduced installing from scratch in 2 Windows machines. This means it is not a specific setting. |
So neither VARIABLES nor executables on the PATH are responsible. |
The problem is not with Go but with Git. Installing version 2.14.1 of git solves the problem. Thank you so much @forskning for your help! |
It's not really a solution, of course, but a workaround. Other users found Git for Windows' bug tracker and opened a ticket there: git-for-windows/git#1312. |
Still happening to me and I have this git version installed: git version 2.14.2.windows.1 What is interesting is that in Task-Manager the shell process still exists, I tried it with both cmd.exe and powershell.exe. |
@Urmeli0815 That is the version which has the problem. It is pointed out in the link by @dscho. Look at this link. Install 2.14.1 and everything will just work! |
The problem is the trailing .1. the version that has the fix is 2.14.2.windows.2. (If you wait an hour or three, you will even be able to get 2.14.2.windows.3)
@pietromenna please do not suggest to downgrade, at least do not call it a fix. I went through quite an effort to release Git for Windows v2.14.2(2) to fix this bug, so suggesting to downgrade is just like a slap in my face. |
@dscho I meant no offence, I just shared what I did. I am glad a new version which fixes the issue as been released! 👍 |
@pietromenna I understand the need to work around things quickly when you do not have time. However, in the interest of making all software better, all I ask is to go to the appropriate channel (in this case, it would have been Git for Windows' bug tracker and work with me (or other frequent Git for Windows contributors) to fix the bug. No big harm done, but let's work together in the future, okay? |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.9 Windows / AMD64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?architecture: amd64
os: Windows 10
What did you do?
cmd
orpowershell
go get github.com/go-sql-driver/mysql
, but this is only an example, any repository has the same behaviour.go get
inside batch script.What did you expect to see?
Expected behavior is same as on Linux. When finishes downloading, to leave the prompt on the current terminal or shell.
What did you see instead?
It closed the current terminal (cmd or powershell)
The text was updated successfully, but these errors were encountered: