Skip to content
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

Gradle should fail if a referenced init script does not exist #4672

Closed
big-guy opened this issue Mar 9, 2018 · 1 comment · Fixed by #4845
Closed

Gradle should fail if a referenced init script does not exist #4672

big-guy opened this issue Mar 9, 2018 · 1 comment · Fixed by #4845
Labels

Comments

@big-guy
Copy link
Member

big-guy commented Mar 9, 2018

When explicitly including an init script (via -I or --init-script), Gradle will silently ignore the init script if it does not exist.

Expected Behavior

gradle -I doesNotExist.gradle ... would fail.

Current Behavior

gradle -I doesNotExist.gradle ... succeeds as if the init script was not requested.

Context

If someone uses init scripts to inject additional configuration conditionally (e.g., on CI only), simple file renames can silently break things.

We had this happen on the gradle/gradle build when we converted our init script to Kotlin.

@wolfs
Copy link
Member

wolfs commented Mar 9, 2018

👍
Silently ignoring non-existing init scripts did bite me quite some times and I think it is surprising that we do no fail the build if the init script is not found.

lptr pushed a commit that referenced this issue Apr 18, 2018
If any of the init scripts specified on the command line does not exist
or is not a file, the build will fail.

Issue: #4672

Signed-off-by: Patrik Erdes <patrik@erdes.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants