-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Print a good error message when GRADLE_USER_HOME is not writable #8913
Comments
Thanks for raising this issue. If you have some spare time, we would be happy to accept a PR for showing a better error message. The change would need to make sure it doesn't cause any performance regression. |
I'd be happy to help, but since I don't know much about how gradle works internally you'd need to give me some hints on how to fix this. |
There is a good chance this is where you would need to fix it: https://github.com/gradle/gradle/blob/master/subprojects/native/src/main/java/org/gradle/internal/nativeintegration/services/NativeServices.java#L100. You can confirm this by printing the stacktrace of the same scenario. It's important to add an integration test to exercise this scenario. You can add the test in this file: https://github.com/gradle/gradle/blob/master/subprojects/core/src/integTest/groovy/org/gradle/NativeServicesIntegrationTest.groovy |
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you're interested in how we try to keep the backlog in a healthy state, please read our blog post on how we refine our backlog. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution. |
I believe this issue is still valid, still confuses users that encounter it for the first time, and should therefore not be closed. The official gradle docker image no longer uses a non-root user so I updated the reproducing example: https://gitlab.com/msrd0/gradle-test/-/jobs/777912920#L72 (Tested against gradle 6.5.1) |
Today I encountered the same error as #1493 inside the
gradle:alpine
(Gradle 5.3.1) docker container using GitLab CI.The error message I got was:
None of the above mentioned flags did output any more information about the issue.
Expected behaviour
I would have expected gradle to give me an error that states something like "Unable to write into GRADLE_USER_HOME (maybe add/replace with real path). Make sure gradle has correct permissions"
Actual behaviour
I received a completely irrelevant error message that does not reveal any information on how to resolve it.
Reproduce
https://gitlab.com/msrd0/gradle-test/-/jobs/188394374
The text was updated successfully, but these errors were encountered: