-
Notifications
You must be signed in to change notification settings - Fork 102
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
Setup can't find Bash nor Git #343
Comments
As far as I understand, this issue should be reopened because you had to use the Linux batch file (setup) instead of The solution posted here is a workaround, but |
Further, it is strongly recommended to use the official git for windows with git-bash rather than a custom installation. This is how we test on windows and how we guarantee that it is working. |
Finally, I would strongly suggest to read and follow the documentation. |
Actually, that is exactly what we tried.
|
I had the exact problem as @JSGitHubbing and @Jorge-Dacal explained. I had to create CYGWIN_HOME environment variable to make it work. |
It wasn't working for me so I uninstalled everything and started again. Apparently, I must have had an error with my Git installation, after uninstalling and installing it again works correctly. The solution seems to Install git with right-click and run as admin, and be careful because it asks many times for permission. |
After all devonfw-ide needs a
Especially since on Windows there exists many different ways to emulate a unix environment with a bash. The current implementation of I assume, the detection logic can be expanded to the case, where this prompt is canceled - and git-for-windows is then installed in a path, where user can write. But the exact logic, how to locate a Up to then, most users might detect that the "natural" procedure
works. Also in cases, where git was not installed with admin rights. If you want that to be more convenient in such not-yet-supported cases help the community to support more setup variants of bash under Windows. In case the N.B.: I personally would try to avoid to run the git installer itself as admin if any possible. This isn't a recommend procedure on windows for any installation. But true - unfortunately some insane configured company security controls force users to use such non-recommend installation procedures. |
IMHO I would completely remove
What do you think? |
First: Fixing the issue described here, seems meanwhile simple enough to me: I have tested the installation of Git for Windows - and Cygwin - as another user, which is denied access to "Local Administrative" rights. In that case the registry settings that help other programs to locate the root directory (of git-for-windows - or cygwin) are indeed created at HKEY_CURRENT_USER - and not under HKEY_LOCAL_MACHINE. I can prepare a PR for that - my first try only had an issue with the goto, which has some limitation in nested loops under Windows batch. Of course even when this is fixed there are still setups, that will lead into similar issues - e.g. if somebody installs the portable version of Git-for-Windows there is no real chance to detect this automatically (other than wild guessing) Of course some additional command line option for the setup could make it easier for the user to provide a specific bash location. Second: With respect to your, @jdiazgon, proposal to remove the setup.bat:
|
So thanks for insisting on this bug and reopening. After all we can agree that there is a problem and we should find a way to improve reliability.
You have not enough insights about devonfw-ide to understand the implications. You would need to look into the scripts and how things work. Also on windows we invested quite some energy to get deeper integration (e.g. into explorer) that does not happen if you run
I strongly disagree here. This is not solving the actual problem here. We would have to rewrite significat portions of the documentation, cause a lot of confusion to existing users, modify the update process, etc. So let us solve the actual problem by trying even harder to figure out where to find (git) bash. I have no time to prioritize this at the moment. If someone wants to contribute, it would already help very much to copy the portion from our scripts to detect bash into a new |
Thanks for your comments, now I can understand why you do not want to remove
As Jörg said, this does not seem the solution to the problem. |
The issues, that non-admin installation of GitForWindows (or Cygwin) wasn't detected yet is fixed by the PR. The issues that |
@markusschuh thanks for your PR that I already merged. So the main problem is solved. For the scripts I would suggest to simply add a trivial OS check to |
When MSYS2 ( git bash) or cygwin execute ˋsetup.batˋ they run it within a forked CMD process - so it isńt that easy to differentiate this case from when it is started within. explorer. But I see one difference in the environment which allows to support also the case, when somebody only has installed the portable git-for-windows: As long as the ˋsetup.batˋ is started from within a bash there is a ˋSHELLˋ set within environment inherited from parent process. Using this - with higher priority over the registry detection - to locate the ˋbashˋ for execution of ˋdevonˋ makes sense. Íll prepare another PR for this case. This alltogether should resolve this current issue to only the — still rare — case, when somebody uses the Windows 10 ( more recent releases) ˋ%SystemRoot%\system32\bash.exeˋ. But WSL / WSL2 is another challenge anyway - and not so relevant for the moment in context of ˋdevonfw-ideˋ . |
We could even introduce a variable |
So actual fix was provided by @markusschuh via PR #360. To finally close this issue I created and merged #388. |
Expected behavior
I wanted to setup the devonfw ide with its setup.bat
Actual behavior
setup.bat doesn't recognize my Git for windows nor bash
As we can see it is intalled
And the environmente variable is set
Steps to reproduce (bug)
In the previous screenshot it may seem that devonfw-ide-scripts-3.2.3.tar is not a folder but it is the name of the folder where I have the setup.bat
Affected version: 3.2.3
The text was updated successfully, but these errors were encountered: