-
Notifications
You must be signed in to change notification settings - Fork 129
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
regression: gradle --version fails in bash, runs well in cmd, on an ENV variable issue for JAVA_HOME, with #477
Comments
@doctorpangloss |
Hmm well it works correctly in a build from January so I think it has something to do with environment variables that I do not understand. |
The preference of execution was changed in busybox but I don't remember the date. |
@doctorpangloss PS: java must be found in a folder inside |
There's nothing wrong with the environment variable. The issue results from a change in the way executables are found. From PRE-5330 on 22nd April 2024 shell scripts take precedence over batch files. The There are various workarounds:
A previous issue on this subject (#405) has additional information. MSYS2 works around the problem by telling falsehoods about the result of the test. I'm reluctant to go down that route. While it may solve this particular issue it seems possible that it could break other perfectly valid tests. |
You can also create a profile file with this:
Or as I said before just |
As an update: gradle is neither a .bat nor a .sh file here. I installed it via chocolatey. I am also seeing that gradle.exe doesn't close its processes correctly while it is running, with error |
@doctorpangloss I'm confused. In your initial post on this issue you provided a script to install gradle by unzipping it and adding How exactly did you install gradle? When I install gradle using Chocolatey from PowerShell as Administrator it says:
The |
This issue is observed in
busybox-w64u-PRE-5531-g0e958a72e.exe
This issue does not reproduce in
which lacks the fixes needed for
chocolatey
related to environment variables.executing this script with
C:/busybox64.exe bash -X ./check_install.sh
gradle --version
fails wherecmd.exe /c "gradle --version"
succeedsYou can install the prereqs by installing Chocolately and then using:
The text was updated successfully, but these errors were encountered: