sous-chefs / confluence

Development repository for the confluence cookbook
https://supermarket.chef.io/cookbooks/confluence
Other
43 stars 46 forks source link

Update setenv.sh.erb update JRE_HOME condition #147

Closed rylectro closed 7 years ago

rylectro commented 7 years ago

By updating the AND condition to "bundled_jre = true" (which is the default attribute value), it allows the condition to evaluate to false by setting attribute "bundled_jre = false". This allows the java cookbook's java_home attribute to be set, if it has been overridden.

Without the "= true" condition, the IF condition can't be bypassed to the ELSE condition, if desired, when using the installer.

I know the official confluence documentation states that the JRE is supported platform. As a former Atlassian support engineer, we used to recommend using the JDK over JRE. Whether the reasons for that recommendation are still valid, I can't say. I think this change is worth while, since it would only change behavior if one wants to override the default attribute value.

legal90 commented 7 years ago

Hi @rylectro , Thanks for your contribution! But seems like you've made a mistake by using = (assignment) instead of == (comparison). TravisCI build failure confirms that.

But even so, comparison with true should not change the behavior of this condition significantly. If Chef Client evaluates the result value of ['confluence']['jvm']['bundled_jre'] attribute to false, then node['confluence']['jvm']['bundled_jre'] statement will return false, so there is no need to compare it with true explicitly.

Talking about the issue #146, it appears that in your case there is some "non-falsy" value set to that attribute. Please, refer to my comment there: https://github.com/parallels-cookbooks/confluence/issues/146#issuecomment-274760326

anuriq commented 7 years ago

Sorry, but this won't do.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.