rvm / rvm1-ansible

The official ansible RVM role to install and manage your Ruby versions.
MIT License
271 stars 136 forks source link

Fix incorrect bool casts #208

Closed rien closed 4 years ago

rien commented 5 years ago

The deprecation fix (deb1d3e) uses <variable> | bool to check whether a list was non-empty or a variable was defined. However, the bool filter just tries to cast its input to a boolean and string values become false.

This PR fixes the intended behaviour by checking if variables are defined and lists are non-empty.

pkuczynski commented 4 years ago

@rien could you resolve conflicts in this PR please?

rien commented 4 years ago

I think this was already fixed by #207 (hence the merge conflicts).

pkuczynski commented 4 years ago

OK, cool, I wasn't sure which solution is correct. Thanks for replying!